Class DatastoreServiceConfig.Builder (2.0.0)

public static final class DatastoreServiceConfig.Builder

Contains static creation methods for DatastoreServiceConfig.

Inheritance

java.lang.Object > DatastoreServiceConfig.Builder

Static Methods

withDeadline(double deadline)

public static DatastoreServiceConfig withDeadline(double deadline)

Create a DatastoreServiceConfig with the given deadline, in seconds.

Parameter
Name Description
deadline double

the deadline to set.

Returns
Type Description
DatastoreServiceConfig

The newly created DatastoreServiceConfig instance.

withDefaults()

public static DatastoreServiceConfig withDefaults()

Helper method for creating a DatastoreServiceConfig instance with default values: Implicit transactions are disabled, reads execute with Consistency#STRONG, and no deadline is provided. When no deadline is provided, datastore rpcs execute with the system-defined deadline.

Returns
Type Description
DatastoreServiceConfig

The newly created DatastoreServiceConfig instance.

withImplicitTransactionManagementPolicy(ImplicitTransactionManagementPolicy p)

public static DatastoreServiceConfig withImplicitTransactionManagementPolicy(ImplicitTransactionManagementPolicy p)

Create a DatastoreServiceConfig with the given implicit transaction management policy.

Parameter
Name Description
p ImplicitTransactionManagementPolicy

the implicit transaction management policy to set.

Returns
Type Description
DatastoreServiceConfig

The newly created DatastoreServiceConfig instance.

withMaxEntityGroupsPerRpc(int maxEntityGroupsPerRpc)

public static DatastoreServiceConfig withMaxEntityGroupsPerRpc(int maxEntityGroupsPerRpc)

Create a DatastoreServiceConfig with the given maximum entity groups per rpc. See Also: DatastoreServiceConfig#maxEntityGroupsPerRpc(int)

Parameter
Name Description
maxEntityGroupsPerRpc int

the maximum entity groups per rpc to set.

Returns
Type Description
DatastoreServiceConfig

The newly created DatastoreServiceConfig instance.

withReadPolicy(ReadPolicy readPolicy)

public static DatastoreServiceConfig withReadPolicy(ReadPolicy readPolicy)

Create a DatastoreServiceConfig with the given read policy.

Parameter
Name Description
readPolicy ReadPolicy

the read policy to set.

Returns
Type Description
DatastoreServiceConfig

The newly created DatastoreServiceConfig instance.