Annotation Interface EnableCacheServer
@Target(TYPE)
@Retention(RUNTIME)
@Inherited
@Documented
@Import(AddCacheServerConfiguration.class)
public @interface EnableCacheServer
The
EnableCacheServer
annotation configures a Spring Configuration
annotated class with a GemFire CacheServer
bean in the Spring application context.
This annotation is used in conjunction with the CacheServerApplication
, or PeerCacheApplication
annotations to add an additional CacheServers
to a GemFire peer cache application
configured with Spring (Data GemFire).
To add more than 1 CacheServer
to your application, this annotation can be nested in
the EnableCacheServers
annotation.- Since:
- 1.9.0
- 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.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.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 time (in seconds ) after which a message in the client queue will expire.Configures thename
of the Spring bean defined in the Spring application context.int
Configures the port on which this cache server listens for clients.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.
-
Element Details
-
autoStartup
boolean autoStartupConfigures whether theCacheServer
should start automatically at runtime. Defaults to {@literal true). Use either the {@literal spring.data.gemfire.cache.server.<beanName>.auto-startup} property or the {@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 either the spring.data.gemfire.cache.server.<beanName>.bind-address property or the spring.data.gemfire.cache.server.bind-address property in application.properties.- Default:
- ""
-
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 either the spring.data.gemfire.cache.server.<beanName>.hostname-for-clients property or the 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 either the spring.data.gemfire.cache.server.<beanName>.load-poll-interval property or the spring.data.gemfire.cache.server.load-poll-interval property in application.properties.- Default:
- 5000L
-
maxConnections
int maxConnectionsConfigures the maximum allowed client connections. Defaults toCacheServer.DEFAULT_MAX_CONNECTIONS
. Use either the spring.data.gemfire.cache.server.<beanName>.max-connections property or the spring.data.gemfire.cache.server.max-connections property in application.properties.- Default:
- 1200
-
maxMessageCount
int maxMessageCountConfigures he maximum number of messages that can be enqueued in a client-queue. Defaults toCacheServer.DEFAULT_MAXIMUM_MESSAGE_COUNT
. Use either the spring.data.gemfire.cache.server.<beanName>.max-message-count property or the 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 either the spring.data.gemfire.cache.server.<beanName>.max-threads property or the 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 either the spring.data.gemfire.cache.server.<beanName>.max-time-between-pings property or the spring.data.gemfire.cache.server.max-time-between-pings property in application.properties.- Default:
- 60000
-
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 either the spring.data.gemfire.cache.server.<beanName>.message-time-to-live property or the spring.data.gemfire.cache.server.message-time-to-live property in application.properties.- Default:
- 180
-
name
String nameConfigures thename
of the Spring bean defined in the Spring application context. Defaults to empty. This attribute is also used to resolve namedCacheServer
properties from application.properties specific to the configuration of thisCacheServer
definition, therefore, this attribute must be specified when external configuration (e.g. application.properties) is used.- Default:
- ""
-
port
int portConfigures the port on which this cache server listens for clients. Defaults toCacheServer.DEFAULT_PORT
. Use either the spring.data.gemfire.cache.server.<beanName>.port property or the spring.data.gemfire.cache.server.port property in application.properties.- Default:
- 40404
-
socketBufferSize
int socketBufferSizeConfigures the configured buffer size of the socket connection for this CacheServer. Defaults toCacheServer.DEFAULT_SOCKET_BUFFER_SIZE
. Use either the spring.data.gemfire.cache.server.<beanName>.socket-buffer-size property or the 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 either the spring.data.gemfire.cache.server.<beanName>.subscription-capacity property or the spring.data.gemfire.cache.server.subscription-capacity property in application.properties.- Default:
- 1
-
subscriptionDiskStoreName
String subscriptionDiskStoreNameConfigures the disk store name for overflow. Use either the spring.data.gemfire.cache.server.<beanName>.subscription-disk-store-name property or the 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 either the spring.data.gemfire.cache.server.<beanName>.subscription-eviction-policy property or the spring.data.gemfire.cache.server.subscription-eviction-policy property in application.properties.- Default:
- NONE
-
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
-