public final class DatastoreServiceConfig
extends java.lang.Object
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);
| Modifier and Type | Class and Description |
|---|---|
static class |
DatastoreServiceConfig.Builder
Contains static creation methods for
DatastoreServiceConfig. |
| Modifier and Type | Method and Description |
|---|---|
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.
|
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 rpcthis (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.