public abstract class LockingCacheEnforcer<K,V> extends Object implements LockingCache<K,V>
| Constructor and Description |
|---|
LockingCacheEnforcer(ReentrantLock[] stripeLocks,
long lockTimeout) |
| Modifier and Type | Method and Description |
|---|---|
<R> R |
executeLockedCallback(KeyLock keyLock,
LockedCallback<K,R> callback) |
protected void |
gateKey(KeyLock keyLock,
K key) |
long |
getLockTimeout() |
protected ReentrantLock[] |
getStripeLockArray() |
KeyLock |
lock(KeyLock keyLock,
K key) |
protected ReentrantLock |
lockStripe(K key) |
void |
unlock(KeyLock keyLock,
K key) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclear, close, exists, get, getCacheName, isClosed, put, putIfAbsent, remove, sizepublic LockingCacheEnforcer(ReentrantLock[] stripeLocks, long lockTimeout) throws CacheException
CacheExceptionpublic long getLockTimeout()
getLockTimeout in interface LockingCache<K,V>public <R> R executeLockedCallback(KeyLock keyLock, LockedCallback<K,R> callback)
executeLockedCallback in interface LockingCache<K,V>public void unlock(KeyLock keyLock, K key)
unlock in interface LockingCache<K,V>protected ReentrantLock[] getStripeLockArray()
protected ReentrantLock lockStripe(K key)
Copyright © 2013. All Rights Reserved.