Annotation Interface CacheServerApplication
@Target(TYPE)
@Retention(RUNTIME)
@Inherited
@Documented
@Configuration
@Import(CacheServerConfiguration.class)
public @interface CacheServerApplication
The CacheServerApplication annotation enables an embedded GemFire
CacheServer
instance in a Spring Data GemFire based application.
In addition, this also implies an embedded GemFire peer Cache
must exist
and therefore will be configured, constructed and initialized as a Spring bean in the application context.- Since:
- 1.9.0
- Author:
- John Blum
- See Also:
-
Optional Element Summary
Modifier and TypeOptional ElementDescriptionboolean
Configures whether theCacheServer
should start automatically at runtime.Configures the ip address or host name that this cache server will listen on.boolean
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.boolean
By default, a GemFire member (both locators and servers) will attempt to reconnect and reinitialize the cache after it has been forced out of the distributed system by a network partition event or has otherwise been shunned by other members.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.Configures the ip address or host name that server locators will tell clients that this cache server is listening on.long
Configures the frequency in milliseconds to poll the load probe on this cache server.Configures the list of Locators defining the cluster to which this Spring cache application will connect.int
Configures the length, in seconds, of distributed lock leases obtained by this cache.int
Configures the number of seconds a cache operation will wait to obtain a distributed lock lease.Configures the log level used to output log messages at GemFire cache runtime.int
Configures the maximum allowed client connections.int
Configures he maximum number of messages that can be enqueued in a client-queue.int
Configures the maximum number of threads allowed in this cache server to service client requests.int
Configures the maximum amount of time between client pings.int
Configures the frequency (in seconds) at which a message will be sent by the primary cache-server to all the secondary cache-server nodes to remove the events which have already been dispatched from the queue.int
Configures the time (in seconds ) after which a message in the client queue will expire.Configures the name of this GemFire member in the cluster (distributed system).int
Configures the port on which this cache server listens for clients.int
Configures the number of seconds a cache get operation can spend searching for a value before it times out.int
Configures the configured buffer size of the socket connection for this CacheServer.int
Configures the capacity of the client queue.Configures the disk store name for overflow.Configures the eviction policy that is executed when capacity of the client queue is reached.boolean
Configures the tcpNoDelay setting of sockets used to send messages to clients.boolean
Determines whether the SpringBeanFactory
locator should be enabled to lookup the SpringBeanFactory
to auto-wire and configure/initialize GemFire components created in a non-Spring managed, GemFire context.boolean
Configures whether this GemFire cache member node would pull it's configuration meta-data from the cluster-based Cluster Configuration service.
-
Element Details
-
autoStartup
boolean autoStartupConfigures whether theCacheServer
should start automatically at runtime. Defaults to {@literal true). Use {@literal spring.data.gemfire.cache.server.auto-startup} property in {@literal application.properties}.- Default:
- true
-
bindAddress
String bindAddressConfigures the ip address or host name that this cache server will listen on. Defaults toCacheServer.DEFAULT_BIND_ADDRESS
. Use spring.data.gemfire.cache.server.bind-address property in application.properties.- Default:
- ""
-
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
-
enableAutoReconnect
boolean enableAutoReconnectBy default, a GemFire member (both locators and servers) will attempt to reconnect and reinitialize the cache after it has been forced out of the distributed system by a network partition event or has otherwise been shunned by other members. Use this property to enable the auto-reconnect behavior. Defaults to false. Use spring.data.gemfire.cache.peer.enable-auto-reconnect property in application.properties.- Default:
- false
-
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
-
hostnameForClients
String hostnameForClientsConfigures the ip address or host name that server locators will tell clients that this cache server is listening on. Defaults toCacheServer.DEFAULT_HOSTNAME_FOR_CLIENTS
. Use spring.data.gemfire.cache.server.hostname-for-clients property in application.properties.- Default:
- ""
-
loadPollInterval
long loadPollIntervalConfigures the frequency in milliseconds to poll the load probe on this cache server. Defaults toCacheServer.DEFAULT_LOAD_POLL_INTERVAL
. Use spring.data.gemfire.cache.server.load-poll-interval property in application.properties.- Default:
- 5000L
-
locators
String locatorsConfigures the list of Locators defining the cluster to which this Spring cache application will connect. Use spring.data.gemfire.locators property in application.properties.- Default:
- ""
-
lockLease
int lockLeaseConfigures the length, in seconds, of distributed lock leases obtained by this cache. Defaults to 120 seconds. Use spring.data.gemfire.cache.peer.lock-lease property in application.properties.- Default:
- 120
-
lockTimeout
int lockTimeoutConfigures the number of seconds a cache operation will wait to obtain a distributed lock lease. Defaults to 60 seconds. Use spring.data.gemfire.cache.peer.lock-timeout property in application.properties.- Default:
- 60
-
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 maximum allowed client connections. Defaults toCacheServer.DEFAULT_MAX_CONNECTIONS
. Use spring.data.gemfire.cache.server.max-connections property in application.properties.- Default:
- 800
-
maxMessageCount
int maxMessageCountConfigures he maximum number of messages that can be enqueued in a client-queue. Defaults toCacheServer.DEFAULT_MAXIMUM_MESSAGE_COUNT
. Use spring.data.gemfire.cache.server.max-message-count property in application.properties.- Default:
- 230000
-
maxThreads
int maxThreadsConfigures the maximum number of threads allowed in this cache server to service client requests. Defaults toCacheServer.DEFAULT_MAX_THREADS
. Use spring.data.gemfire.cache.server.max-threads property in application.properties.- Default:
- 0
-
maxTimeBetweenPings
int maxTimeBetweenPingsConfigures the maximum amount of time between client pings. Defaults toCacheServer.DEFAULT_MAXIMUM_TIME_BETWEEN_PINGS
. Use spring.data.gemfire.cache.server.max-time-between-pings property in application.properties.- Default:
- 60000
-
messageSyncInterval
int messageSyncIntervalConfigures the frequency (in seconds) at which a message will be sent by the primary cache-server to all the secondary cache-server nodes to remove the events which have already been dispatched from the queue. Defaults to 1 second. Use spring.data.gemfire.cache.peer.message-sync-interval property in application.properties.- Default:
- 1
-
messageTimeToLive
int messageTimeToLiveConfigures the time (in seconds ) after which a message in the client queue will expire. Defaults toCacheServer.DEFAULT_MESSAGE_TIME_TO_LIVE
. Use spring.data.gemfire.cache.server.message-time-to-live property in application.properties.- Default:
- 180
-
name
String nameConfigures the name of this GemFire member in the cluster (distributed system). Defaults to SpringBasedCacheServerApplication. Use either the spring.data.gemfire.name or the spring.data.gemfire.cache.name property in application.properties.- Default:
- "SpringBasedCacheServerApplication"
-
port
int portConfigures the port on which this cache server listens for clients. Defaults toCacheServer.DEFAULT_PORT
. Use spring.data.gemfire.cache.server.port property in application.properties.- Default:
- 40404
-
searchTimeout
int searchTimeoutConfigures the number of seconds a cache get operation can spend searching for a value before it times out. Defaults to 300 seconds, or 5 minutes. Use spring.data.gemfire.cache.peer.search-timeout property in application.properties.- Default:
- 300
-
socketBufferSize
int socketBufferSizeConfigures the configured buffer size of the socket connection for this CacheServer. Defaults toCacheServer.DEFAULT_SOCKET_BUFFER_SIZE
. Use spring.data.gemfire.cache.server.socket-buffer-size property in application.properties.- Default:
- 32768
-
subscriptionCapacity
int subscriptionCapacityConfigures the capacity of the client queue. Defaults toClientSubscriptionConfig.DEFAULT_CAPACITY
. Use spring.data.gemfire.cache.server.subscription-capacity property in application.properties.- Default:
- 1
-
subscriptionDiskStoreName
String subscriptionDiskStoreNameConfigures the disk store name for overflow. Use spring.data.gemfire.cache.server.subscription-disk-store-name property in application.properties.- Default:
- ""
-
subscriptionEvictionPolicy
SubscriptionEvictionPolicy subscriptionEvictionPolicyConfigures the eviction policy that is executed when capacity of the client queue is reached. Defaults toSubscriptionEvictionPolicy.NONE
. Use spring.data.gemfire.cache.server.subscription-eviction-policy property in application.properties.- Default:
- NONE
-
useBeanFactoryLocator
boolean useBeanFactoryLocatorDetermines whether the SpringBeanFactory
locator 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
-
useClusterConfiguration
boolean useClusterConfigurationConfigures whether this GemFire cache member node would pull it's configuration meta-data from the cluster-based Cluster Configuration service. Defaults to false. Use spring.data.gemfire.cache.peer.use-cluster-configuration property in application.properties.- Default:
- false
-
tcpNoDelay
boolean tcpNoDelayConfigures the tcpNoDelay setting of sockets used to send messages to clients. TcpNoDelay is enabled by default. Use either the spring.data.gemfire.cache.server.<beanName>.tcp-no-delay property or the spring.data.gemfire.cache.server.tcp-no-delay property in application.properties.- Default:
- true
-