Class CloudDatastoreRemoteServiceConfig.Builder
- Enclosing class:
CloudDatastoreRemoteServiceConfig
CloudDatastoreRemoteServiceConfig
.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaccessToken
(String accessToken) Sets the access token.Provides a set of additional app IDs that may appear inKey
values in entities.Sets theCloudDatastoreRemoteServiceConfig.AppId
of the Cloud Datastore instance to call.asyncStackTraceCaptureEnabled
(boolean value) If set to true, stacktrace for async calls is captured and returned as part of error messages.build()
emulatorHost
(String value) Instructs the client to connect to a locally-running Cloud Datastore Emulator and not to pass credentials.hostOverride
(String value) Overrides the host (e.g.httpConnectTimeoutMillis
(int value) Sets the HTTP connect timeout in milliseconds.installApiProxyEnvironment
(boolean value) If set to true, a minimalApiProxy.Environment
will be installed (if none is already installed).maxRetries
(int value) Sets the maximum number of retries for underlying HTTP connect exceptions.useComputeEngineCredential
(boolean value) If set to true, always use a Compute Engine credential instead of using the Application Default Credentials library to construct the credential.useServiceAccountCredential
(String serviceAccountId, PrivateKey privateKey) Instructs the client to use a service account credential instead of using the Application Default Credentials library to construct the credential.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
appId
public abstract CloudDatastoreRemoteServiceConfig.Builder appId(CloudDatastoreRemoteServiceConfig.AppId value) Sets theCloudDatastoreRemoteServiceConfig.AppId
of the Cloud Datastore instance to call. Required. -
emulatorHost
Instructs the client to connect to a locally-running Cloud Datastore Emulator and not to pass credentials. -
hostOverride
Overrides the host (e.g.datastore.googleapis.com
) used to contact the Cloud Datastore API. To connect to the Cloud Datastore Emulator, useemulatorHost(java.lang.String)
instead. -
additionalAppIds
public abstract CloudDatastoreRemoteServiceConfig.Builder additionalAppIds(Set<CloudDatastoreRemoteServiceConfig.AppId> value) Provides a set of additional app IDs that may appear inKey
values in entities.This is only required if the client will read entities containing
Key
values that contain app IDs other than the one provided toappId(com.google.appengine.api.datastore.CloudDatastoreRemoteServiceConfig.AppId)
. Any such app IDs should be provided to this method. -
installApiProxyEnvironment
If set to true, a minimalApiProxy.Environment
will be installed (if none is already installed).If set to false, no attempt to install an environment will be made and the user must install it instead. At a minimum, such an environment must provide implementations for
ApiProxy.Environment.getAppId()
,ApiProxy.Environment.getAttributes()
, andApiProxy.Environment.getRemainingMillis()
. -
useComputeEngineCredential
If set to true, always use a Compute Engine credential instead of using the Application Default Credentials library to construct the credential.Cannot be combined with a call to
useServiceAccountCredential(String, PrivateKey)
oraccessToken(String)
. -
maxRetries
Sets the maximum number of retries for underlying HTTP connect exceptions. -
httpConnectTimeoutMillis
Sets the HTTP connect timeout in milliseconds. -
asyncStackTraceCaptureEnabled
public abstract CloudDatastoreRemoteServiceConfig.Builder asyncStackTraceCaptureEnabled(boolean value) If set to true, stacktrace for async calls is captured and returned as part of error messages. There is overhead in capturing this stack trace and it is recommended to enable it primarily for debugging. -
accessToken
Sets the access token.Cannot be combined with a call to
useComputeEngineCredential(boolean)
oruseServiceAccountCredential(String, PrivateKey)
. -
useServiceAccountCredential
public CloudDatastoreRemoteServiceConfig.Builder useServiceAccountCredential(String serviceAccountId, PrivateKey privateKey) Instructs the client to use a service account credential instead of using the Application Default Credentials library to construct the credential.Cannot be combined with a call to
useComputeEngineCredential(boolean)
oraccessToken(String)
. -
build
-