public class ClusteredRedisDLockFactory extends BaseRedisDLockFactory
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_MAX_ATTEMPTS |
myOwnRedis| Constructor and Description |
|---|
ClusteredRedisDLockFactory() |
| Modifier and Type | Method and Description |
|---|---|
protected com.github.ddth.commons.redis.JedisConnector |
buildJedisConnector() |
protected ClusteredRedisDLock |
createLockInternal(String name,
Properties lockProps)
Create a new lock instance, but does not initialize it.
|
String |
getRedisHostsAndPorts()
Redis' hosts and ports scheme (format
host1:port1,host2:port2,host3:port3). |
static redis.clients.jedis.JedisCluster |
newJedisCluster(String hostsAndPorts,
String password)
Creates a new
JedisCluster, with default timeout. |
static redis.clients.jedis.JedisCluster |
newJedisCluster(String hostsAndPorts,
String password,
long timeoutMs)
Creates a new
JedisCluster. |
ClusteredRedisDLockFactory |
setRedisHostsAndPorts(String redisHostsAndPorts)
Redis' hosts and ports scheme (format
host1:port1,host2:port2,host3:port3). |
destroy, getJedisConnector, getRedisPassword, init, setJedisConnector, setRedisPasswordbuildLockName, close, createAndInitLockInstance, createLock, getLockNamePrefix, getLockProperties, getLockPropertiesMap, setLockNamePrefix, setLockPropertiespublic static final int DEFAULT_MAX_ATTEMPTS
public static redis.clients.jedis.JedisCluster newJedisCluster(String hostsAndPorts, String password)
JedisCluster, with default timeout.hostsAndPorts - format host1:port1,host2:port2...password - public static redis.clients.jedis.JedisCluster newJedisCluster(String hostsAndPorts, String password, long timeoutMs)
JedisCluster.hostsAndPorts - format host1:port1,host2:port2...password - timeoutMs - public String getRedisHostsAndPorts()
host1:port1,host2:port2,host3:port3).public ClusteredRedisDLockFactory setRedisHostsAndPorts(String redisHostsAndPorts)
host1:port1,host2:port2,host3:port3).redisHostsAndPorts - protected com.github.ddth.commons.redis.JedisConnector buildJedisConnector()
buildJedisConnector in class BaseRedisDLockFactoryprotected ClusteredRedisDLock createLockInternal(String name, Properties lockProps)
createLockInternal in class AbstractDLockFactoryCopyright © 2018 DDTH. All rights reserved.