public class RedissonConnectionConfiguration
extends org.redisson.config.Config
implements org.springframework.data.redis.connection.RedisConfiguration
org.springframework.data.redis.connection.RedisConfiguration.ClusterConfiguration, org.springframework.data.redis.connection.RedisConfiguration.DomainSocketConfiguration, org.springframework.data.redis.connection.RedisConfiguration.SentinelConfiguration, org.springframework.data.redis.connection.RedisConfiguration.StaticMasterReplicaConfiguration, org.springframework.data.redis.connection.RedisConfiguration.WithDatabaseIndex, org.springframework.data.redis.connection.RedisConfiguration.WithDomainSocket, org.springframework.data.redis.connection.RedisConfiguration.WithHostAndPort, org.springframework.data.redis.connection.RedisConfiguration.WithPassword
Constructor and Description |
---|
RedissonConnectionConfiguration()
无参构造
|
Modifier and Type | Method and Description |
---|---|
static org.redisson.connection.ConnectionManager |
createConnectionManager(RedissonConnectionConfiguration configCopy)
创建连接管理器
|
static RedissonConnectionConfiguration |
fromJSON(File file)
获取配置(json格式)
|
static RedissonConnectionConfiguration |
fromJSON(File file,
ClassLoader classLoader)
获取配置(json格式)
|
static RedissonConnectionConfiguration |
fromJSON(InputStream inputStream)
获取配置(json格式)
|
static RedissonConnectionConfiguration |
fromJSON(Reader reader)
获取配置(json格式)
|
static RedissonConnectionConfiguration |
fromJSON(String content)
获取配置(json格式)
|
static RedissonConnectionConfiguration |
fromJSON(URL url)
获取配置(json格式)
|
static RedissonConnectionConfiguration |
fromYAML(File file)
获取配置(yml格式)
|
static RedissonConnectionConfiguration |
fromYAML(File file,
ClassLoader classLoader)
获取配置(yml格式)
|
static RedissonConnectionConfiguration |
fromYAML(InputStream inputStream)
获取配置(yml格式)
|
static RedissonConnectionConfiguration |
fromYAML(Reader reader)
获取配置(yml格式)
|
static RedissonConnectionConfiguration |
fromYAML(String content)
获取配置(yml格式)
|
static RedissonConnectionConfiguration |
fromYAML(URL url)
获取配置(yml格式)
|
org.redisson.config.ClusterServersConfig |
getClusterServersConfig()
获取集群配置
|
org.redisson.connection.ConnectionManager |
getConnectionManager()
获取连接管理器
|
int |
getDatabase()
获取数据库索引
|
org.redisson.config.MasterSlaveServersConfig |
getMasterSlaveServersConfig()
获取主从配置
|
org.redisson.config.ReplicatedServersConfig |
getReplicatedServersConfig()
获取云托管配置
|
org.redisson.config.SentinelServersConfig |
getSentinelServersConfig()
获取哨兵配置
|
org.redisson.config.SingleServerConfig |
getSingleServerConfig()
获取单机配置
|
void |
setClusterServersConfig(org.redisson.config.ClusterServersConfig clusterServersConfig)
设置集群配置
|
void |
setConnectionManager(org.redisson.connection.ConnectionManager connectionManager)
设置连接管理器
|
void |
setDatabase(int index)
设置数据库索引
|
void |
setMasterSlaveServersConfig(org.redisson.config.MasterSlaveServersConfig masterSlaveServersConfig)
设置主从配置
|
void |
setReplicatedServersConfig(org.redisson.config.ReplicatedServersConfig replicatedServersConfig)
设置云托管配置
|
void |
setSentinelServersConfig(org.redisson.config.SentinelServersConfig sentinelServersConfig)
设置哨兵配置
|
void |
setSingleServerConfig(org.redisson.config.SingleServerConfig singleServerConfig)
设置单机配置
|
String |
toJSON()
配置转为字符串
|
String |
toYAML()
配置转为字符串
|
void |
useCustomServers(org.redisson.connection.ConnectionManager connectionManager)
使用自定义模式
|
getAddressResolverGroupFactory, getCodec, getEventLoopGroup, getExecutor, getLockWatchdogTimeout, getMaxCleanUpDelay, getMinCleanUpDelay, getNettyThreads, getThreads, getTransportMode, isClusterConfig, isDecodeInExecutor, isKeepPubSubOrder, isReferenceEnabled, isSentinelConfig, isUseScriptCache, setAddressResolverGroupFactory, setCodec, setDecodeInExecutor, setEventLoopGroup, setExecutor, setKeepPubSubOrder, setLockWatchdogTimeout, setMaxCleanUpDelay, setMinCleanUpDelay, setNettyThreads, setReferenceEnabled, setThreads, setTransportMode, setUseScriptCache, useClusterServers, useMasterSlaveServers, useReplicatedServers, useSentinelServers, useSingleServer
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getDatabaseOrElse, getDatabaseOrElse, getHostOrElse, getPasswordOrElse, getPasswordOrElse, getPortOrElse, isClusterConfiguration, isDatabaseIndexAware, isDomainSocketConfiguration, isHostAndPortAware, isPasswordAware, isSentinelConfiguration, isStaticMasterReplicaConfiguration
public org.redisson.config.SentinelServersConfig getSentinelServersConfig()
public void setSentinelServersConfig(org.redisson.config.SentinelServersConfig sentinelServersConfig)
sentinelServersConfig
- 哨兵配置public org.redisson.config.MasterSlaveServersConfig getMasterSlaveServersConfig()
public void setMasterSlaveServersConfig(org.redisson.config.MasterSlaveServersConfig masterSlaveServersConfig)
masterSlaveServersConfig
- 主从配置public org.redisson.config.SingleServerConfig getSingleServerConfig()
public void setSingleServerConfig(org.redisson.config.SingleServerConfig singleServerConfig)
singleServerConfig
- 单机配置public org.redisson.config.ClusterServersConfig getClusterServersConfig()
public void setClusterServersConfig(org.redisson.config.ClusterServersConfig clusterServersConfig)
clusterServersConfig
- 集群配置public org.redisson.config.ReplicatedServersConfig getReplicatedServersConfig()
public void setReplicatedServersConfig(org.redisson.config.ReplicatedServersConfig replicatedServersConfig)
replicatedServersConfig
- 云托管配置public org.redisson.connection.ConnectionManager getConnectionManager()
public void setConnectionManager(org.redisson.connection.ConnectionManager connectionManager)
connectionManager
- 连接管理器public void useCustomServers(org.redisson.connection.ConnectionManager connectionManager)
useCustomServers
in class org.redisson.config.Config
connectionManager
- 连接管理器public static RedissonConnectionConfiguration fromJSON(String content) throws IOException
content
- 配置内容IOException
public static RedissonConnectionConfiguration fromJSON(InputStream inputStream) throws IOException
inputStream
- 配置内容IOException
public static RedissonConnectionConfiguration fromJSON(File file, ClassLoader classLoader) throws IOException
file
- 配置文件classLoader
- 类加载器IOException
public static RedissonConnectionConfiguration fromJSON(File file) throws IOException
file
- 配置文件IOException
public static RedissonConnectionConfiguration fromJSON(URL url) throws IOException
url
- 配置文件路径IOException
public static RedissonConnectionConfiguration fromJSON(Reader reader) throws IOException
reader
- 配置文件读取器IOException
public String toJSON() throws IOException
toJSON
in class org.redisson.config.Config
IOException
public static RedissonConnectionConfiguration fromYAML(String content) throws IOException
content
- 配置内容IOException
public static RedissonConnectionConfiguration fromYAML(InputStream inputStream) throws IOException
inputStream
- 配置内容IOException
public static RedissonConnectionConfiguration fromYAML(File file) throws IOException
file
- 配置文件IOException
public static RedissonConnectionConfiguration fromYAML(File file, ClassLoader classLoader) throws IOException
file
- 配置文件classLoader
- 类加载器IOException
public static RedissonConnectionConfiguration fromYAML(URL url) throws IOException
url
- 配置文件路径IOException
public static RedissonConnectionConfiguration fromYAML(Reader reader) throws IOException
reader
- 配置文件读取器IOException
public String toYAML() throws IOException
toYAML
in class org.redisson.config.Config
IOException
public static org.redisson.connection.ConnectionManager createConnectionManager(RedissonConnectionConfiguration configCopy)
configCopy
- 配置public void setDatabase(int index)
index
- 数据库索引public int getDatabase()
Copyright © 2019. All rights reserved.