Class DatastoreFactory (2.20.1)

public class DatastoreFactory

Client factory for Datastore.

Inheritance

java.lang.Object > DatastoreFactory

Static Fields

DEFAULT_HOST

public static final String DEFAULT_HOST
Field Value
Type Description
String

VERSION

public static final String VERSION

API version.

Field Value
Type Description
String

Static Methods

get()

public static DatastoreFactory get()
Returns
Type Description
DatastoreFactory

logMethodCalls()

public static void logMethodCalls()

Starts logging datastore method calls to the console. (Useful within tests.)

Constructors

DatastoreFactory()

public DatastoreFactory()

Methods

create(DatastoreOptions options)

public Datastore create(DatastoreOptions options)

Provides access to a datastore using the provided options. Logs into the application using the credentials available via these options.

Parameter
Name Description
options DatastoreOptions
Returns
Type Description
Datastore

makeClient(DatastoreOptions options)

public HttpRequestFactory makeClient(DatastoreOptions options)

Constructs a Google APIs HTTP client with the associated credentials.

Parameter
Name Description
options DatastoreOptions
Returns
Type Description
com.google.api.client.http.HttpRequestFactory

newRemoteRpc(DatastoreOptions options)

protected RemoteRpc newRemoteRpc(DatastoreOptions options)
Parameter
Name Description
options DatastoreOptions
Returns
Type Description
com.google.datastore.v1.client.RemoteRpc