Annotation 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

    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.
    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 the name 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 autoStartup
      Configures whether the CacheServer 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 bindAddress
      Configures the ip address or host name that this cache server will listen on. Defaults to CacheServer.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 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 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 loadPollInterval
      Configures the frequency in milliseconds to poll the load probe on this cache server. Defaults to CacheServer.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 maxConnections
      Configures the maximum allowed client connections. Defaults to CacheServer.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 maxMessageCount
      Configures he maximum number of messages that can be enqueued in a client-queue. Defaults to CacheServer.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 maxThreads
      Configures the maximum number of threads allowed in this cache server to service client requests. Defaults to CacheServer.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 maxTimeBetweenPings
      Configures the maximum amount of time between client pings. Defaults to CacheServer.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 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 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 name
      Configures the name of the Spring bean defined in the Spring application context. Defaults to empty. This attribute is also used to resolve named CacheServer properties from application.properties specific to the configuration of this CacheServer definition, therefore, this attribute must be specified when external configuration (e.g. application.properties) is used.
      Default:
      ""
    • port

      int port
      Configures the port on which this cache server listens for clients. Defaults to CacheServer.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 socketBufferSize
      Configures the configured buffer size of the socket connection for this CacheServer. Defaults to CacheServer.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 subscriptionCapacity
      Configures the capacity of the client queue. Defaults to ClientSubscriptionConfig.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 subscriptionDiskStoreName
      Configures 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 subscriptionEvictionPolicy
      Configures the eviction policy that is executed when capacity of the client queue is reached. Defaults to SubscriptionEvictionPolicy.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 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