Class DatastoreFactory

java.lang.Object
com.google.datastore.v1.client.DatastoreFactory
Direct Known Subclasses:
DatastoreEmulatorFactory, MockDatastoreFactory

public class DatastoreFactory extends Object
Client factory for Datastore.
  • Field Details

  • Constructor Details

    • DatastoreFactory

      public DatastoreFactory()
  • Method Details

    • 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)