Class DatastoreOptions (2.13.2)

public class DatastoreOptions

An immutable object containing settings for the datastore.

Example for connecting to a datastore:

DatastoreOptions options = new DatastoreOptions.Builder() .projectId("my-project-id") .credential(DatastoreHelper.getComputeEngineCredential()) .build(); DatastoreFactory.get().create(options);

The options should be passed to DatastoreFactory#create.

Inheritance

java.lang.Object > DatastoreOptions

Static Fields

SCOPES

public static final List<String> SCOPES
Field Value
TypeDescription
List<String>

Methods

getCredential()

public Credential getCredential()
Returns
TypeDescription
com.google.api.client.auth.oauth2.Credential

getHost()

public String getHost()
Returns
TypeDescription
String

getInitializer()

public HttpRequestInitializer getInitializer()
Returns
TypeDescription
com.google.api.client.http.HttpRequestInitializer

getLocalHost()

public String getLocalHost()
Returns
TypeDescription
String

getProjectEndpoint()

public String getProjectEndpoint()
Returns
TypeDescription
String

getProjectId()

public String getProjectId()
Returns
TypeDescription
String

getTransport()

public HttpTransport getTransport()
Returns
TypeDescription
com.google.api.client.http.HttpTransport