Send feedback
Class DatastoreOptions (3.11.0)
Stay organized with collections
Save and categorize content based on your preferences.
3.11.0 (latest)
3.7.0
3.3.0
3.2.0
3.1.0
2.40.0
2.37.0
2.36.0
2.34.0
2.33.3
2.32.3
2.31.4
2.30.0
2.29.1
2.28.2
2.27.1
2.26.4
2.25.2
2.24.3
2.23.0
2.22.0
2.21.3
2.20.2
2.19.2
2.18.5
2.17.6
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 .
Static Fields
SCOPES
public static final List<String> SCOPES
Methods
getCredential()
public Credential getCredential ()
Returns
Type
Description
com.google.api.client.auth.oauth2.Credential
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
Send feedback
Need to tell us more?
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2026-11-20 UTC."],[],[]]