Package com.google.datastore.v1.client
Class DatastoreFactory
- java.lang.Object
-
- com.google.datastore.v1.client.DatastoreFactory
-
- Direct Known Subclasses:
DatastoreEmulatorFactory,MockDatastoreFactory
public class DatastoreFactory extends Object
Client factory forDatastore.
-
-
Field Summary
Fields Modifier and Type Field Description static StringDEFAULT_HOSTstatic StringVERSIONAPI version.
-
Constructor Summary
Constructors Constructor Description DatastoreFactory()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Datastorecreate(DatastoreOptions options)Provides access to a datastore using the provided options.static DatastoreFactoryget()static voidlogMethodCalls()Starts logging datastore method calls to the console.com.google.api.client.http.HttpRequestFactorymakeClient(DatastoreOptions options)Constructs a Google APIs HTTP client with the associated credentials.protected com.google.datastore.v1.client.RemoteRpcnewRemoteRpc(DatastoreOptions options)
-
-
-
Field Detail
-
VERSION
public static final String VERSION
API version.- See Also:
- Constant Field Values
-
DEFAULT_HOST
public static final String DEFAULT_HOST
- See Also:
- Constant Field Values
-
-
Method Detail
-
get
public static DatastoreFactory get()
-
create
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.- Throws:
IllegalArgumentException- if the server or credentials weren't provided.
-
makeClient
public com.google.api.client.http.HttpRequestFactory makeClient(DatastoreOptions options)
Constructs a Google APIs HTTP client with the associated credentials.
-
logMethodCalls
public static void logMethodCalls()
Starts logging datastore method calls to the console. (Useful within tests.)
-
newRemoteRpc
protected com.google.datastore.v1.client.RemoteRpc newRemoteRpc(DatastoreOptions options)
-
-