Class DatastoreOptions (2.20.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
Type Description
List<String>

Methods

getCredential()

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

getHost()

public String getHost()
Returns
Type Description
String

getInitializer()

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

getLocalHost()

public String getLocalHost()
Returns
Type Description
String

getProjectEndpoint()

public String getProjectEndpoint()
Returns
Type Description
String

getProjectId()

public String getProjectId()
Returns
Type Description
String

getTransport()

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