Class RemoteDatastoreHelper (2.19.2)

publicclass RemoteDatastoreHelper

Utility to create a remote datastore configuration for testing. Datastore options can be obtained via the #getOptions() method. Returned options use a randomly generated namespace (DatastoreOptions#getNamespace()) that can be used to run the tests. Once the tests are run, all entities in the namespace can be deleted using #deleteNamespace(). Returned options also have custom DatastoreOptions#getRetrySettings(): RetrySettings#getMaxAttempts() is 10, RetrySettings#getMaxRetryDelay() is 30000, RetrySettings#getTotalTimeout() is 120000 and RetrySettings#getInitialRetryDelay() is 250. HttpTransportOptions#getConnectTimeout() and HttpTransportOptions#getReadTimeout() are both both set to 60000.

Internal testing use only

Inheritance

java.lang.Object > RemoteDatastoreHelper

Static Methods

create()

publicstaticRemoteDatastoreHelpercreate()

Creates a RemoteStorageHelper object.

Returns
Type Description
RemoteDatastoreHelper

create(String databaseId)

publicstaticRemoteDatastoreHelpercreate(StringdatabaseId)

Creates a RemoteStorageHelper object.

Parameter
Name Description
databaseId String
Returns
Type Description
RemoteDatastoreHelper

Methods

deleteNamespace()

publicvoiddeleteNamespace()

Deletes all entities in the namespace associated with this RemoteDatastoreHelper.

getOptions()

publicDatastoreOptionsgetOptions()

Returns a DatastoreOptions object to be used for testing. The options are associated to a randomly generated namespace.

Returns
Type Description
DatastoreOptions

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年11月19日 UTC.