Package org.redisson.config
Class SingleServerConfig
- java.lang.Object
-
- org.redisson.config.BaseConfig<SingleServerConfig>
-
- org.redisson.config.SingleServerConfig
-
public class SingleServerConfig extends BaseConfig<SingleServerConfig>
- Author:
- Nikita Koksharov
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getAddress()
int
getConnectionMinimumIdleSize()
int
getConnectionPoolSize()
int
getDatabase()
long
getDnsMonitoringInterval()
int
getSubscriptionConnectionMinimumIdleSize()
int
getSubscriptionConnectionPoolSize()
SingleServerConfig
setAddress(String address)
Set server address.SingleServerConfig
setConnectionMinimumIdleSize(int connectionMinimumIdleSize)
Minimum idle Redis connection amount.SingleServerConfig
setConnectionPoolSize(int connectionPoolSize)
Redis connection pool sizeSingleServerConfig
setDatabase(int database)
Database index used for Redis connection Default is0
SingleServerConfig
setDnsMonitoringInterval(long dnsMonitoringInterval)
Interval in milliseconds to check the endpoint's DNSSingleServerConfig
setSubscriptionConnectionMinimumIdleSize(int subscriptionConnectionMinimumIdleSize)
Minimum idle subscription connection amount.SingleServerConfig
setSubscriptionConnectionPoolSize(int subscriptionConnectionPoolSize)
Redis subscription-connection pool size limit-
Methods inherited from class org.redisson.config.BaseConfig
getClientName, getConnectTimeout, getIdleConnectionTimeout, getNameMapper, getPassword, getPingConnectionInterval, getRetryAttempts, getRetryInterval, getSslKeystore, getSslKeystorePassword, getSslProtocols, getSslProvider, getSslTruststore, getSslTruststorePassword, getSubscriptionsPerConnection, getTimeout, getUsername, isKeepAlive, isSslEnableEndpointIdentification, isTcpNoDelay, setClientName, setConnectTimeout, setIdleConnectionTimeout, setKeepAlive, setNameMapper, setPassword, setPingConnectionInterval, setRetryAttempts, setRetryInterval, setSslEnableEndpointIdentification, setSslKeystore, setSslKeystorePassword, setSslProtocols, setSslProvider, setSslTruststore, setSslTruststorePassword, setSubscriptionsPerConnection, setTcpNoDelay, setTimeout, setUsername
-
-
-
-
Method Detail
-
setConnectionPoolSize
public SingleServerConfig setConnectionPoolSize(int connectionPoolSize)
Redis connection pool sizeDefault is
64
- Parameters:
connectionPoolSize
- - pool size- Returns:
- config
-
getConnectionPoolSize
public int getConnectionPoolSize()
-
setSubscriptionConnectionPoolSize
public SingleServerConfig setSubscriptionConnectionPoolSize(int subscriptionConnectionPoolSize)
Redis subscription-connection pool size limitDefault 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 DNSApplications 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 is0
- Parameters:
database
- index- Returns:
- config
-
getDatabase
public int getDatabase()
-
-