|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.google.appengine.api.datastore.DatastoreServiceConfig
public final class DatastoreServiceConfig
User-configurable properties of the datastore.
Notes on usage:
The recommended way to instantiate a DatastoreServiceConfig
object
is to statically import DatastoreServiceConfig.Builder
.* and invoke a static creation
method followed by an instance mutator (if needed):
import static com.google.appengine.api.datastore.DatastoreServiceConfig.Builder.*; import com.google.appengine.api.datastore.ReadPolicy.Consistency; ... // eventually consistent reads DatastoreServiceConfig config = withReadPolicy(new ReadPolicy(Consistency.EVENTUAL)); // eventually consistent reads with a 5 second deadline DatastoreServiceConfig config = withReadPolicy(new ReadPolicy(Consistency.EVENTUAL)).deadline(5.0);
Nested Class Summary | |
---|---|
static class |
DatastoreServiceConfig.Builder
Contains static creation methods for DatastoreServiceConfig . |
Method Summary | |
---|---|
DatastoreServiceConfig |
deadline(double deadline)
Sets the deadline, in seconds, for all rpcs initiated by the DatastoreService with which this config is associated. |
java.lang.Double |
getDeadline()
|
ImplicitTransactionManagementPolicy |
getImplicitTransactionManagementPolicy()
|
java.lang.Integer |
getMaxEntityGroupsPerRpc()
|
ReadPolicy |
getReadPolicy()
|
DatastoreServiceConfig |
implicitTransactionManagementPolicy(ImplicitTransactionManagementPolicy p)
Sets the implicit transaction management policy. |
DatastoreServiceConfig |
maxEntityGroupsPerRpc(int maxEntityGroupsPerRpc)
Sets the maximum number of entity groups that can be represented in a single rpc. |
DatastoreServiceConfig |
readPolicy(ReadPolicy readPolicy)
Sets the read policy. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public DatastoreServiceConfig implicitTransactionManagementPolicy(ImplicitTransactionManagementPolicy p)
p
- the implicit transaction management policy to set.
this
(for chaining)public DatastoreServiceConfig readPolicy(ReadPolicy readPolicy)
readPolicy
- the read policy to set.
this
(for chaining)public DatastoreServiceConfig deadline(double deadline)
DatastoreService
with which this config is associated.
deadline
- the deadline to set.
this
(for chaining)
java.lang.IllegalArgumentException
- if deadline is not positivepublic DatastoreServiceConfig maxEntityGroupsPerRpc(int maxEntityGroupsPerRpc)
maxEntityGroupsPerRpc
- the maximum number of entity groups per rpc
this
(for chaining)
java.lang.IllegalArgumentException
- if maxEntityGroupsPerRpc is not greater
than zeropublic ImplicitTransactionManagementPolicy getImplicitTransactionManagementPolicy()
ImplicitTransactionManagementPolicy
to use.public ReadPolicy getReadPolicy()
ReadPolicy
to use.public java.lang.Integer getMaxEntityGroupsPerRpc()
public java.lang.Double getDeadline()
null
.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |