Annotation 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

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    boolean
    Configures whether the CacheServer 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 Spring BeanFactory locator should be enabled to lookup the Spring BeanFactory 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 autoStartup
      Configures whether the CacheServer 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 bindAddress
      Configures the ip address or host name that this cache server will listen on. Defaults to CacheServer.DEFAULT_BIND_ADDRESS. Use spring.data.gemfire.cache.server.bind-address property in application.properties.
      Default:
      ""
    • copyOnRead

      boolean copyOnRead
      Indicates 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 criticalHeapPercentage
      Configures the percentage of heap at or above which the cache is considered in danger of becoming inoperable. Defaults to ResourceManager.DEFAULT_CRITICAL_PERCENTAGE. Use spring.data.gemfire.cache.critical-heap-percentage property in application.properties.
      Default:
      0.0f
    • criticalOffHeapPercentage

      float criticalOffHeapPercentage
      Configures 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 enableAutoReconnect
      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. 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 evictionHeapPercentage
      Configures the percentage of heap at or above which the eviction should begin on Regions configured for HeapLRU eviction. Defaults to ResourceManager.DEFAULT_EVICTION_PERCENTAGE. Use spring.data.gemfire.cache.eviction-heap-percentage property in application.properties.
      Default:
      0.0f
    • evictionOffHeapPercentage

      float evictionOffHeapPercentage
      Configures 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 hostnameForClients
      Configures the ip address or host name that server locators will tell clients that this cache server is listening on. Defaults to CacheServer.DEFAULT_HOSTNAME_FOR_CLIENTS. Use spring.data.gemfire.cache.server.hostname-for-clients property in application.properties.
      Default:
      ""
    • loadPollInterval

      long loadPollInterval
      Configures the frequency in milliseconds to poll the load probe on this cache server. Defaults to CacheServer.DEFAULT_LOAD_POLL_INTERVAL. Use spring.data.gemfire.cache.server.load-poll-interval property in application.properties.
      Default:
      5000L
    • locators

      String locators
      Configures 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 lockLease
      Configures 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 lockTimeout
      Configures 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 logLevel
      Configures 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 maxConnections
      Configures the maximum allowed client connections. Defaults to CacheServer.DEFAULT_MAX_CONNECTIONS. Use spring.data.gemfire.cache.server.max-connections property in application.properties.
      Default:
      800
    • maxMessageCount

      int maxMessageCount
      Configures he maximum number of messages that can be enqueued in a client-queue. Defaults to CacheServer.DEFAULT_MAXIMUM_MESSAGE_COUNT. Use spring.data.gemfire.cache.server.max-message-count property in application.properties.
      Default:
      230000
    • maxThreads

      int maxThreads
      Configures the maximum number of threads allowed in this cache server to service client requests. Defaults to CacheServer.DEFAULT_MAX_THREADS. Use spring.data.gemfire.cache.server.max-threads property in application.properties.
      Default:
      0
    • maxTimeBetweenPings

      int maxTimeBetweenPings
      Configures the maximum amount of time between client pings. Defaults to CacheServer.DEFAULT_MAXIMUM_TIME_BETWEEN_PINGS. Use spring.data.gemfire.cache.server.max-time-between-pings property in application.properties.
      Default:
      60000
    • messageSyncInterval

      int messageSyncInterval
      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. Defaults to 1 second. Use spring.data.gemfire.cache.peer.message-sync-interval property in application.properties.
      Default:
      1
    • messageTimeToLive

      int messageTimeToLive
      Configures the time (in seconds ) after which a message in the client queue will expire. Defaults to CacheServer.DEFAULT_MESSAGE_TIME_TO_LIVE. Use spring.data.gemfire.cache.server.message-time-to-live property in application.properties.
      Default:
      180
    • name

      String name
      Configures 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 port
      Configures the port on which this cache server listens for clients. Defaults to CacheServer.DEFAULT_PORT. Use spring.data.gemfire.cache.server.port property in application.properties.
      Default:
      40404
    • searchTimeout

      int searchTimeout
      Configures 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 socketBufferSize
      Configures the configured buffer size of the socket connection for this CacheServer. Defaults to CacheServer.DEFAULT_SOCKET_BUFFER_SIZE. Use spring.data.gemfire.cache.server.socket-buffer-size property in application.properties.
      Default:
      32768
    • subscriptionCapacity

      int subscriptionCapacity
      Configures the capacity of the client queue. Defaults to ClientSubscriptionConfig.DEFAULT_CAPACITY. Use spring.data.gemfire.cache.server.subscription-capacity property in application.properties.
      Default:
      1
    • subscriptionDiskStoreName

      String subscriptionDiskStoreName
      Configures the disk store name for overflow. Use spring.data.gemfire.cache.server.subscription-disk-store-name property in application.properties.
      Default:
      ""
    • subscriptionEvictionPolicy

      SubscriptionEvictionPolicy subscriptionEvictionPolicy
      Configures the eviction policy that is executed when capacity of the client queue is reached. Defaults to SubscriptionEvictionPolicy.NONE. Use spring.data.gemfire.cache.server.subscription-eviction-policy property in application.properties.
      Default:
      NONE
    • useBeanFactoryLocator

      boolean useBeanFactoryLocator
      Determines whether the Spring BeanFactory locator should be enabled to lookup the Spring BeanFactory 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 useClusterConfiguration
      Configures 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 tcpNoDelay
      Configures 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