public class LockManager extends Object implements Serializable
Modifier and Type | Class and Description |
---|---|
static class |
LockManager.Lock |
Modifier and Type | Field and Description |
---|---|
static long |
DEFAULT_LOCK_REACQUIRE_TIMESPAN_MINUTES |
static long |
DEFAULT_LOCK_TIMESPAN_MINUTES |
Constructor and Description |
---|
LockManager() |
LockManager(long lockTimespan) |
Modifier and Type | Method and Description |
---|---|
void |
expireLocksForOwner(String lockerId) |
LockManager.Lock |
forcedUnlock(String lockKey) |
long |
getLockTimeSpan() |
LockManager.Lock |
lock(String lockKey,
String lockerId) |
LockManager.Lock |
unlock(String lockKey,
String lockerId) |
public static final long DEFAULT_LOCK_TIMESPAN_MINUTES
public static final long DEFAULT_LOCK_REACQUIRE_TIMESPAN_MINUTES
public LockManager()
public LockManager(long lockTimespan)
public long getLockTimeSpan()
public LockManager.Lock lock(String lockKey, String lockerId)
public LockManager.Lock forcedUnlock(String lockKey)
public LockManager.Lock unlock(String lockKey, String lockerId)
public void expireLocksForOwner(String lockerId)