public class ClusterJedisLock extends Object
| 构造器和说明 |
|---|
ClusterJedisLock(RedisClusterClient client,
String lockKey)
Detailed constructor with default acquire timeout 10000 msecs and lock expiration of 60000 msecs.
|
ClusterJedisLock(RedisClusterClient client,
String lockKey,
int timeoutMsecs)
Detailed constructor with default lock expiration of 60000 msecs.
|
ClusterJedisLock(RedisClusterClient client,
String lockKey,
int timeoutMsecs,
int expireMsecs) |
ClusterJedisLock(String lockKey)
Detailed constructor with default acquire timeout 10000 msecs and lock expiration of 60000 msecs.
|
ClusterJedisLock(String lockKey,
int timeoutMsecs)
Detailed constructor with default lock expiration of 60000 msecs.
|
ClusterJedisLock(String lockKey,
int timeoutMsecs,
int expireMsecs)
Detailed constructor.
|
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
acquire()
功能描述: Acquire lock.
|
boolean |
acquire(RedisClusterClient client)
功能描述: Acquire lock.
|
String |
getLockKey()
功能描述: 获取锁
|
void |
release()
功能描述: Acqurired lock release.
|
void |
release(RedisClusterClient client)
功能描述: Acqurired lock release.
|
public ClusterJedisLock(RedisClusterClient client, String lockKey)
client - lockKey - public ClusterJedisLock(RedisClusterClient client, String lockKey, int timeoutMsecs)
client - lockKey - timeoutMsecs - public ClusterJedisLock(RedisClusterClient client, String lockKey, int timeoutMsecs, int expireMsecs)
public ClusterJedisLock(String lockKey)
lockKey - public ClusterJedisLock(String lockKey, int timeoutMsecs)
lockKey - timeoutMsecs - public ClusterJedisLock(String lockKey, int timeoutMsecs, int expireMsecs)
lockKey - timeoutMsecs - expireMsecs - public String getLockKey()
public boolean acquire()
throws InterruptedException
InterruptedException - boolean
date: 2018年4月11日 下午4:45:38public boolean acquire(RedisClusterClient client) throws InterruptedException
client - InterruptedException - boolean
date: 2018年4月11日 下午4:45:58public void release()
public void release(RedisClusterClient client)
client - void
date: 2018年4月11日 下午4:46:18Copyright © 2018. All rights reserved.