Package com.google.datastore.v1.client
Class DatastoreOptions
- java.lang.Object
-
- com.google.datastore.v1.client.DatastoreOptions
-
public class DatastoreOptions extends Object
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(com.google.datastore.v1.client.DatastoreOptions)
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DatastoreOptions.Builder
Builder forDatastoreOptions
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.google.api.client.auth.oauth2.Credential
getCredential()
String
getDatabaseId()
String
getHost()
com.google.api.client.http.HttpRequestInitializer
getInitializer()
String
getLocalHost()
String
getProjectEndpoint()
String
getProjectId()
com.google.api.client.http.HttpTransport
getTransport()
-
-
-
Method Detail
-
getProjectId
public String getProjectId()
-
getDatabaseId
@BetaApi public String getDatabaseId()
-
getProjectEndpoint
public String getProjectEndpoint()
-
getHost
public String getHost()
-
getLocalHost
public String getLocalHost()
-
getInitializer
public com.google.api.client.http.HttpRequestInitializer getInitializer()
-
getCredential
public com.google.api.client.auth.oauth2.Credential getCredential()
-
getTransport
public com.google.api.client.http.HttpTransport getTransport()
-
-