public class RedisDLockFactory extends BaseRedisDLockFactory
myOwnRedis| Constructor and Description |
|---|
RedisDLockFactory() |
| Modifier and Type | Method and Description |
|---|---|
protected com.github.ddth.commons.redis.JedisConnector |
buildJedisConnector() |
protected RedisDLock |
createLockInternal(String name,
Properties lockProps)
Create a new lock instance, but does not initialize it.
|
String |
getRedisHostAndPort()
Redis' host and port scheme (format
host:port). |
static redis.clients.jedis.JedisPool |
newJedisPool(String hostAndPort,
String password)
Creates a new
JedisPool, with default database and timeout. |
static redis.clients.jedis.JedisPool |
newJedisPool(String hostAndPort,
String password,
int db)
Creates a new
JedisPool, with specified database and default
timeout. |
static redis.clients.jedis.JedisPool |
newJedisPool(String hostAndPort,
String password,
int db,
long timeoutMs)
Creates a new
JedisPool. |
static redis.clients.jedis.JedisPool |
newJedisPool(String hostAndPort,
String password,
long timeoutMs)
Creates a new
JedisPool with default database and specified
timeout. |
RedisDLockFactory |
setRedisHostAndPort(String redisHostAndPort)
Sets Redis' host and port scheme (format
host:port). |
destroy, getJedisConnector, getRedisPassword, init, setJedisConnector, setRedisPasswordbuildLockName, close, createAndInitLockInstance, createLock, getLockNamePrefix, getLockProperties, getLockPropertiesMap, setLockNamePrefix, setLockPropertiespublic static redis.clients.jedis.JedisPool newJedisPool(String hostAndPort, String password)
JedisPool, with default database and timeout.hostAndPort - password - public static redis.clients.jedis.JedisPool newJedisPool(String hostAndPort, String password, int db)
JedisPool, with specified database and default
timeout.hostAndPort - password - db - public static redis.clients.jedis.JedisPool newJedisPool(String hostAndPort, String password, long timeoutMs)
JedisPool with default database and specified
timeout.hostAndPort - password - timeoutMs - public static redis.clients.jedis.JedisPool newJedisPool(String hostAndPort, String password, int db, long timeoutMs)
JedisPool.hostAndPort - password - db - timeoutMs - public String getRedisHostAndPort()
host:port).public RedisDLockFactory setRedisHostAndPort(String redisHostAndPort)
host:port).redisHostAndPort - protected com.github.ddth.commons.redis.JedisConnector buildJedisConnector()
buildJedisConnector in class BaseRedisDLockFactoryprotected RedisDLock createLockInternal(String name, Properties lockProps)
createLockInternal in class AbstractDLockFactoryCopyright © 2018 DDTH. All rights reserved.