Class SingleServerConfig

java.lang.Object
org.redisson.config.BaseConfig<SingleServerConfig>
org.redisson.config.SingleServerConfig

public class SingleServerConfig extends BaseConfig<SingleServerConfig>
Author:
Nikita Koksharov
  • Method Details

    • setConnectionPoolSize

      public SingleServerConfig setConnectionPoolSize(int connectionPoolSize)
      Redis connection pool size

      Default is 64

      Parameters:
      connectionPoolSize - - pool size
      Returns:
      config
    • getConnectionPoolSize

      public int getConnectionPoolSize()
    • setSubscriptionConnectionPoolSize

      public SingleServerConfig setSubscriptionConnectionPoolSize(int subscriptionConnectionPoolSize)
      Redis subscription-connection pool size limit

      Default is 50

      Parameters:
      subscriptionConnectionPoolSize - - pool size
      Returns:
      config
    • getSubscriptionConnectionPoolSize

      public int getSubscriptionConnectionPoolSize()
    • setAddress

      public SingleServerConfig setAddress(String address)
      Set server address. Use follow format -- host:port
      Parameters:
      address - of Redis
      Returns:
      config
    • getAddress

      public String getAddress()
    • setDnsMonitoringInterval

      public SingleServerConfig setDnsMonitoringInterval(long dnsMonitoringInterval)
      Interval in milliseconds to check the endpoint's DNS

      Applications must ensure the JVM DNS cache TTL is low enough to support this.

      Set -1 to disable.

      Default is 5000.

      Parameters:
      dnsMonitoringInterval - time
      Returns:
      config
    • getDnsMonitoringInterval

      public long getDnsMonitoringInterval()
    • setSubscriptionConnectionMinimumIdleSize

      public SingleServerConfig setSubscriptionConnectionMinimumIdleSize(int subscriptionConnectionMinimumIdleSize)
      Minimum idle subscription connection amount.

      Default is 1

      Parameters:
      subscriptionConnectionMinimumIdleSize - - connections amount
      Returns:
      config
    • getSubscriptionConnectionMinimumIdleSize

      public int getSubscriptionConnectionMinimumIdleSize()
    • setConnectionMinimumIdleSize

      public SingleServerConfig setConnectionMinimumIdleSize(int connectionMinimumIdleSize)
      Minimum idle Redis connection amount.

      Default is 24

      Parameters:
      connectionMinimumIdleSize - - connections amount
      Returns:
      config
    • getConnectionMinimumIdleSize

      public int getConnectionMinimumIdleSize()
    • setDatabase

      public SingleServerConfig setDatabase(int database)
      Database index used for Redis connection Default is 0
      Parameters:
      database - index
      Returns:
      config
    • getDatabase

      public int getDatabase()