public class InProcessMemoryLockSource extends Object implements LockSource
ConcurrentHashMap
.
Note that this implementation does not check for overall heap consumption nor free system memory.
Constructor and Description |
---|
InProcessMemoryLockSource() |
Modifier and Type | Method and Description |
---|---|
void |
discard(String key)
Discards the lock for a key.
|
void |
discardAll()
Discards all locks.
|
Lock |
getReadLock(String key)
Gets a unique lock for a key.
|
Lock |
getWriteLock(String key)
Gets a unique lock for a key.
|
public Lock getReadLock(String key)
LockSource
getReadLock
in interface LockSource
key
- The keypublic Lock getWriteLock(String key)
LockSource
getWriteLock
in interface LockSource
key
- The keypublic void discard(String key)
LockSource
discard
in interface LockSource
key
- The keypublic void discardAll()
LockSource
discardAll
in interface LockSource
Copyright © 2009-2016 Three Crickets LLC.