Annotation Interface ClientCacheApplication
@Target(TYPE)
@Retention(RUNTIME)
@Inherited
@Documented
@Configuration
@Import(ClientCacheConfiguration.class)
public @interface ClientCacheApplication
The
ClientCacheApplication
annotation enables a Spring Data GemFire/Geode based application to become
a GemFire/Geode cache client (i.e. ClientCache
).- Since:
- 1.9.0
- Author:
- John Blum
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic @interface
static @interface
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionboolean
Indicates whether the "copy on read" is enabled for this cache.float
Configures the percentage of heap at or above which the cache is considered in danger of becoming inoperable.float
Configures the percentage of off-heap at or above which the cache is considered in danger of becoming inoperable.Used only for clients in a client/server installation.int
Used only for clients in a client/server installation.float
Configures the percentage of heap at or above which the eviction should begin on Regions configured for HeapLRU eviction.float
Configures the percentage of off-heap at or above which the eviction should begin on Regions configured for HeapLRU eviction.int
Configures the free connection timeout for this pool.long
Configures the amount of time a connection can be idle before expiring the connection.boolean
Configures whether to keep the client queues alive on the server when the client is disconnected Defaults to false.int
Configures the load conditioning interval for this pool.Configures the GemFireLocators
to which this cache client will connect.Configures the log level used to output log messages at GemFire cache runtime.int
Configures the max number of client to server connections that the pool will create.int
Configures the minimum number of connections to keep available at all times.boolean
If set to true then the created pool can be used by multiple users.Configures the name of this GemFire member in the cluster (distributed system).long
Configures how often to ping servers to verify that they are still alive.boolean
By defaultprSingleHopEnabled
is true in which case the client is aware of the location of partitions on servers hosting Regions withDataPolicy.PARTITION
.int
Configures the number of milliseconds to wait for a response from a server before timing out the operation and trying another server (if any are available).boolean
Notifies the server that this durable client is ready to receive updates.int
Configures the number of times to retry a request after timeout/exception.int
Configures the server connection timeout for the DEFAULT Pool.Configures the group that all servers in which this pool connects to must belong to.Configures the GemFireCacheServers
to which this cache client will connect.int
Configures the socket buffer size for each connection made in this pool.int
Configures thesocket connect timeout
for the DEFAULTPool
.Configures theSocketFactory
bean name
used by the DEFAULTPool
to create connections to both Locators (if configured usinglocators()
) and Servers.int
Configures how often to send client statistics to the server.int
Configures the interval in milliseconds to wait before sending acknowledgements to the cache server for events received from the server subscriptions.boolean
If set to true then the created pool will have server-to-client subscriptions enabled.int
Configures the messageTrackingTimeout attribute which is the time-to-live period, in milliseconds, for subscription events the client has received from the server.int
Configures the redundancy level for this pools server-to-client subscriptions.boolean
Configures the thread local connections policy for this pool.boolean
Determines whether theGemfireBeanFactoryLocator
should be enabled to lookup the SpringBeanFactory
to auto-wire and configure/initialize GemFire components created in a non-Spring managed, GemFire context.
-
Element Details
-
copyOnRead
boolean copyOnReadIndicates whether the "copy on read" is enabled for this cache. Defaults to false. Use spring.data.gemfire.cache.copy-on-read property in application.properties.- Default:
- false
-
criticalHeapPercentage
float criticalHeapPercentageConfigures the percentage of heap at or above which the cache is considered in danger of becoming inoperable. Defaults toResourceManager.DEFAULT_CRITICAL_PERCENTAGE
. Use spring.data.gemfire.cache.critical-heap-percentage property in application.properties.- Default:
- 0.0f
-
criticalOffHeapPercentage
float criticalOffHeapPercentageConfigures the percentage of off-heap at or above which the cache is considered in danger of becoming inoperable. Defaults to 0.0. Use spring.data.gemfire.cache.critical-off-heap-percentage property in application.properties.- Default:
- 0.0f
-
durableClientId
String durableClientIdUsed only for clients in a client/server installation. If set, this indicates that the client is durable and identifies the client. The ID is used by servers to reestablish any messaging that was interrupted by client downtime. Use spring.data.gemfire.cache.client.durable-client-id property in application.properties.- Default:
- ""
-
durableClientTimeout
int durableClientTimeoutUsed only for clients in a client/server installation. Number of seconds this client can remain disconnected from its server and have the server continue to accumulate durable events for it. Defaults to 300 seconds, or 5 minutes. Use spring.data.gemfire.cache.client.durable-client-timeout property in application.properties.- Default:
- 300
-
evictionHeapPercentage
float evictionHeapPercentageConfigures the percentage of heap at or above which the eviction should begin on Regions configured for HeapLRU eviction. Defaults toResourceManager.DEFAULT_EVICTION_PERCENTAGE
. Use spring.data.gemfire.cache.eviction-heap-percentage property in application.properties.- Default:
- 0.0f
-
evictionOffHeapPercentage
float evictionOffHeapPercentageConfigures the percentage of off-heap at or above which the eviction should begin on Regions configured for HeapLRU eviction. Defaults to 0.0. Use spring.data.gemfire.cache.eviction-off-heap-percentage property in application.properties.- Default:
- 0.0f
-
freeConnectionTimeout
int freeConnectionTimeoutConfigures the free connection timeout for this pool. Defaults toPoolFactory.DEFAULT_FREE_CONNECTION_TIMEOUT
. Use either the spring.data.gemfire.pool.default.free-connection-timeout property or the spring.data.gemfire.pool.free-connection-timeout property in application.properties.- Default:
- 10000
-
idleTimeout
long idleTimeoutConfigures the amount of time a connection can be idle before expiring the connection. Defaults toPoolFactory.DEFAULT_IDLE_TIMEOUT
. Use either the spring.data.gemfire.pool.default.idle-timeout property or the spring.data.gemfire.pool.idle-timeout property in application.properties.- Default:
- 5000L
-
keepAlive
boolean keepAliveConfigures whether to keep the client queues alive on the server when the client is disconnected Defaults to false. Use spring.data.gemfire.cache.client.keep-alive property in application.properties.- Default:
- false
-
loadConditioningInterval
int loadConditioningIntervalConfigures the load conditioning interval for this pool. Defaults toPoolFactory.DEFAULT_LOAD_CONDITIONING_INTERVAL
. Use either the spring.data.gemfire.pool.default.load-conditioning-interval property or the spring.data.gemfire.pool.load-conditioning-interval property in application.properties.- Default:
- 300000
-
locators
ClientCacheApplication.Locator[] locatorsConfigures the GemFireLocators
to which this cache client will connect. Use either the spring.data.gemfire.pool.default.locators property or the spring.data.gemfire.pool.locators property in application.properties.- Default:
- {}
-
logLevel
String logLevelConfigures the log level used to output log messages at GemFire cache runtime. Defaults to config. Use spring.data.gemfire.cache.log-level property in application.properties.- Default:
- "config"
-
maxConnections
int maxConnectionsConfigures the max number of client to server connections that the pool will create. Defaults toPoolFactory.DEFAULT_MAX_CONNECTIONS
. Use either the spring.data.gemfire.pool.default.max-connections property or the spring.data.gemfire.pool.max-connections property in application.properties.- Default:
- -1
-
minConnections
int minConnectionsConfigures the minimum number of connections to keep available at all times. Defaults toPoolFactory.DEFAULT_MIN_CONNECTIONS
. Use either the spring.data.gemfire.pool.default.min-connections property or the spring.data.gemfire.pool.min-connections property in application.properties.- Default:
- 1
-
multiUserAuthentication
boolean multiUserAuthenticationIf set to true then the created pool can be used by multiple users. Defaults toPoolFactory.DEFAULT_MULTIUSER_AUTHENTICATION
. Use either the spring.data.gemfire.pool.default.multi-user-authentication property or the spring.data.gemfire.pool.multi-user-authentication property in application.properties.- Default:
- false
-
name
String nameConfigures the name of this GemFire member in the cluster (distributed system). Defaults to SpringBasedClientCacheApplication. Use either the spring.data.gemfire.name or the spring.data.gemfire.cache.name property in application.properties.- Default:
- "SpringBasedClientCacheApplication"
-
pingInterval
long pingIntervalConfigures how often to ping servers to verify that they are still alive. Defaults toPoolFactory.DEFAULT_PING_INTERVAL
. Use either the spring.data.gemfire.pool.default.ping-interval property or the spring.data.gemfire.pool.ping-interval property in application.properties.- Default:
- 10000L
-
prSingleHopEnabled
boolean prSingleHopEnabledBy defaultprSingleHopEnabled
is true in which case the client is aware of the location of partitions on servers hosting Regions withDataPolicy.PARTITION
. Defaults toPoolFactory.DEFAULT_PR_SINGLE_HOP_ENABLED
. Use either the spring.data.gemfire.pool.default.pr-single-hop-enabled property or the spring.data.gemfire.pool.pr-single-hop-enabled property in application.properties.- Default:
- true
-
readTimeout
int readTimeoutConfigures the number of milliseconds to wait for a response from a server before timing out the operation and trying another server (if any are available). Defaults toPoolFactory.DEFAULT_READ_TIMEOUT
. Use either the spring.data.gemfire.pool.default.read-timeout property or the spring.data.gemfire.pool.read-timeout property in application.properties.- Default:
- 10000
-
readyForEvents
boolean readyForEventsNotifies the server that this durable client is ready to receive updates. Defaults to false. Use either the spring.data.gemfire.pool.default.ready-for-events property or the spring.data.gemfire.pool.ready-for-events property in application.properties.- Default:
- false
-
retryAttempts
int retryAttemptsConfigures the number of times to retry a request after timeout/exception. Defaults toPoolFactory.DEFAULT_RETRY_ATTEMPTS
. Use either the spring.data.gemfire.pool.default.retry-attempts property or the spring.data.gemfire.pool.retry-attempts property in application.properties.- Default:
- -1
-
serverConnectionTimeout
int serverConnectionTimeoutConfigures the server connection timeout for the DEFAULT Pool. If the pool has a max connections setting, operations will block if there is no free connection for a specific server. The server connection timeout specifies how long those operations will block waiting for a free connection for a specific server before receiving anAllConnectionsInUseException
. If max connections is not set this setting has no effect. This setting differs fromfreeConnectionTimeout()
, which sets the wait time for any server connection in the pool, whereas this setting sets the wait time for a free connection to a specific server. Defaults toPoolFactory.DEFAULT_SERVER_CONNECTION_TIMEOUT
. Use either the spring.data.gemfire.pool.default.server-connection-timeout property or the spring.data.gemfire.pool.server-connection-timeout property in application.properties.- Default:
- 0
-
serverGroup
String serverGroupConfigures the group that all servers in which this pool connects to must belong to. Defaults toPoolFactory.DEFAULT_SERVER_GROUP
. Use either the spring.data.gemfire.pool.default.server-group property or the spring.data.gemfire.pool.server-group property in application.properties.- Default:
- ""
-
servers
ClientCacheApplication.Server[] serversConfigures the GemFireCacheServers
to which this cache client will connect. Use either the spring.data.gemfire.pool.default.servers property or the spring.data.gemfire.pool.servers property in application.properties.- Default:
- {}
-
socketBufferSize
int socketBufferSizeConfigures the socket buffer size for each connection made in this pool. Defaults toPoolFactory.DEFAULT_SOCKET_BUFFER_SIZE
. Use either the spring.data.gemfire.pool.default.socket-buffer-size property or the spring.data.gemfire.pool.socket-buffer-size property in application.properties.- Default:
- 32768
-
socketConnectTimeout
int socketConnectTimeoutConfigures thesocket connect timeout
for the DEFAULTPool
. The number of milliseconds specified as socket timeout when the client connects to the servers/locators. A timeout of zero is interpreted as an infinite timeout. The connection will then block until established or an error occurs. Defaults toPoolFactory.DEFAULT_SOCKET_CONNECT_TIMEOUT
. Use either the spring.data.gemfire.pool.default.socket-connect-timeout property or the spring.data.gemfire.pool.socket-connect-timeout property in application.properties.- Default:
- 59000
-
socketFactoryBeanName
String socketFactoryBeanNameConfigures theSocketFactory
bean name
used by the DEFAULTPool
to create connections to both Locators (if configured usinglocators()
) and Servers. Defaults to unset. Use either the spring.data.gemfire.pool.default.socket-factory-bean-name property or the spring.data.gemfire.pool.socket-factory-bean-name property in application.properties.- Default:
- ""
-
statisticInterval
int statisticIntervalConfigures how often to send client statistics to the server. Defaults toPoolFactory.DEFAULT_STATISTIC_INTERVAL
. Use either the spring.data.gemfire.pool.default.statistic-interval property or the spring.data.gemfire.pool.statistic-interval property in application.properties.- Default:
- -1
-
subscriptionAckInterval
int subscriptionAckIntervalConfigures the interval in milliseconds to wait before sending acknowledgements to the cache server for events received from the server subscriptions. Defaults toPoolFactory.DEFAULT_SUBSCRIPTION_ACK_INTERVAL
. Use either the spring.data.gemfire.pool.default.subscription-ack-interval property or the spring.data.gemfire.pool.subscription-ack-interval property in application.properties.- Default:
- 100
-
subscriptionEnabled
boolean subscriptionEnabledIf set to true then the created pool will have server-to-client subscriptions enabled. Defaults toPoolFactory.DEFAULT_SUBSCRIPTION_ENABLED
. Use either the spring.data.gemfire.pool.default.subscription-enabled property or the spring.data.gemfire.pool.subscription-enabled property in application.properties.- Default:
- false
-
subscriptionMessageTrackingTimeout
int subscriptionMessageTrackingTimeoutConfigures the messageTrackingTimeout attribute which is the time-to-live period, in milliseconds, for subscription events the client has received from the server. Defaults toPoolFactory.DEFAULT_SUBSCRIPTION_MESSAGE_TRACKING_TIMEOUT
. Use either the spring.data.gemfire.pool.default.subscription-message-tracking-timeout property or the spring.data.gemfire.pool.subscription-message-tracking-timeout property in application.properties.- Default:
- 900000
-
subscriptionRedundancy
int subscriptionRedundancyConfigures the redundancy level for this pools server-to-client subscriptions. Defaults toPoolFactory.DEFAULT_SUBSCRIPTION_REDUNDANCY
. Use either the spring.data.gemfire.pool.default.subscription-redundancy property or the spring.data.gemfire.pool.subscription-redundancy property in application.properties.- Default:
- 0
-
threadLocalConnections
boolean threadLocalConnectionsConfigures the thread local connections policy for this pool. Defaults toPoolFactory.DEFAULT_THREAD_LOCAL_CONNECTIONS
. Use either the spring.data.gemfire.pool.default.thread-local-connections property or the spring.data.gemfire.pool.thread-local-connections property in application.properties.- Default:
- false
-
useBeanFactoryLocator
boolean useBeanFactoryLocatorDetermines whether theGemfireBeanFactoryLocator
should be enabled to lookup the SpringBeanFactory
to auto-wire and configure/initialize GemFire components created in a non-Spring managed, GemFire context. Defaults to false. Use spring.data.gemfire.use-bean-factory-locator property in application.properties.- Default:
- false
-