Class GcpDatastoreProperties
java.lang.Object
com.google.cloud.spring.autoconfigure.datastore.GcpDatastoreProperties
- All Implemented Interfaces:
CredentialsSupplier
@ConfigurationProperties("spring.cloud.gcp.datastore")
public class GcpDatastoreProperties
extends Object
implements CredentialsSupplier
Properties for configuring Cloud Datastore.
- Since:
- 1.1
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintReturns the maximum number of Datastore clients to cache when using dynamic namespaces.Supplies credentials configuration.getHost()booleanbooleanReturns whether to use HTTP/JSON transport instead of gRPC for Cloud Datastore.voidsetCacheCapacity(int cacheCapacity) Sets the maximum number of Datastore clients to cache when using dynamic namespaces.voidsetDatabaseId(String databaseId) voidvoidsetNamespace(String namespace) voidsetProjectId(String projectId) voidsetSkipNullValue(boolean skipNullValue) voidsetUseHttpJson(boolean useHttpJson) Sets whether to use HTTP/JSON transport instead of gRPC for Cloud Datastore.
-
Constructor Details
-
GcpDatastoreProperties
public GcpDatastoreProperties()
-
-
Method Details
-
getCredentials
Description copied from interface:CredentialsSupplierSupplies credentials configuration.- Specified by:
getCredentialsin interfaceCredentialsSupplier- Returns:
- a POJO containing Google Cloud credentials location and scopes
-
getEmulator
-
getProjectId
-
setProjectId
-
getDatabaseId
-
setDatabaseId
-
getNamespace
-
setNamespace
-
getHost
-
setHost
-
isSkipNullValue
public boolean isSkipNullValue() -
setSkipNullValue
public void setSkipNullValue(boolean skipNullValue) -
isUseHttpJson
public boolean isUseHttpJson()Returns whether to use HTTP/JSON transport instead of gRPC for Cloud Datastore.- Returns:
trueif HTTP/JSON transport is enabled;falseotherwise.
-
setUseHttpJson
public void setUseHttpJson(boolean useHttpJson) Sets whether to use HTTP/JSON transport instead of gRPC for Cloud Datastore.- Parameters:
useHttpJson-trueto use HTTP/JSON transport;falseto use gRPC.
-
getCacheCapacity
public int getCacheCapacity()Returns the maximum number of Datastore clients to cache when using dynamic namespaces.- Returns:
- the cache capacity.
-
setCacheCapacity
public void setCacheCapacity(int cacheCapacity) Sets the maximum number of Datastore clients to cache when using dynamic namespaces.- Parameters:
cacheCapacity- the cache capacity to set.
-