public abstract class BaseRedisDLock extends AbstractDLock
| Modifier and Type | Field and Description |
|---|---|
static String |
LOCK_PROP_REDIS_PASSWORD
To override the
setRedisPassword(String) setting. |
protected boolean |
myOwnRedis
Flag to mark if the Redis resource (e.g.
|
DEFAULT_LOCK_DURATION_MS| Constructor and Description |
|---|
BaseRedisDLock(String name) |
| Modifier and Type | Method and Description |
|---|---|
void |
destroy() |
JedisConnector |
getJedisConnector() |
String |
getRedisPassword() |
protected String |
getScriptLock() |
protected String |
getScriptUnlock() |
BaseRedisDLock |
init() |
BaseRedisDLock |
setJedisConnector(JedisConnector jedisConnector) |
BaseRedisDLock |
setRedisPassword(String redisPassword) |
protected BaseRedisDLock |
setScriptLock(String scriptLock) |
protected BaseRedisDLock |
setScriptUnlock(String scriptUnlock) |
protected void |
updateLockHolder(redis.clients.jedis.JedisCommands jedisCommands)
Update current lock's holder info.
|
close, getClientId, getLockProperties, getLockProperty, getName, getTimestampExpiry, lock, setClientId, setLockProperties, setName, setTimestampExpiry, toString, updateLockHolderpublic static final String LOCK_PROP_REDIS_PASSWORD
setRedisPassword(String) setting.protected boolean myOwnRedis
public BaseRedisDLock(String name)
public JedisConnector getJedisConnector()
public BaseRedisDLock setJedisConnector(JedisConnector jedisConnector)
jedisConnector - public String getRedisPassword()
public BaseRedisDLock setRedisPassword(String redisPassword)
public BaseRedisDLock init()
init in class AbstractDLockpublic void destroy()
destroy in class AbstractDLockprotected String getScriptLock()
protected BaseRedisDLock setScriptLock(String scriptLock)
protected String getScriptUnlock()
protected BaseRedisDLock setScriptUnlock(String scriptUnlock)
protected void updateLockHolder(redis.clients.jedis.JedisCommands jedisCommands)
jedisCommands - Copyright © 2018 DDTH. All rights reserved.