public abstract class AbstractCache<K,V,E extends CacheEntry<V>> extends LockingCacheEnforcer<K,V> implements LockingCache<K,V>
| Constructor and Description |
|---|
AbstractCache(String cacheName,
CacheSource<K,V,E> cacheSource,
CacheExpirationPolicy<E> cacheExpirationPolicy,
int initialCapacity,
float loadFactor,
int concurrencyLevel,
long externalLockTimeout) |
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
void |
close() |
protected E |
createNewEntry(K key,
Object... parameters) |
boolean |
exists(KeyLock keyLock,
K key) |
protected E |
expireEntry(K key) |
abstract V |
get(KeyLock keyLock,
K key,
Object... parameters) |
String |
getCacheName() |
protected E |
getExistingEntry(KeyLock keyLock,
K key) |
protected Iterator<K> |
getKeyIterator() |
protected E |
implantReference(CacheReference<K,E> cacheReference) |
boolean |
isClosed() |
V |
put(KeyLock keyLock,
K key,
V value) |
V |
putIfAbsent(KeyLock keyLock,
K key,
V value) |
abstract V |
remove(KeyLock keyLock,
K key) |
protected E |
retrieveEntry(KeyLock keyLock,
K key) |
int |
size() |
void |
validate(KeyLock keyLock,
CacheValidationPolicy<E> cacheValidationPolicy) |
executeLockedCallback, gateKey, getLockTimeout, getStripeLockArray, lock, lockStripe, unlockclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitexecuteLockedCallback, getLockTimeout, lock, unlockpublic AbstractCache(String cacheName, CacheSource<K,V,E> cacheSource, CacheExpirationPolicy<E> cacheExpirationPolicy, int initialCapacity, float loadFactor, int concurrencyLevel, long externalLockTimeout) throws CacheException
CacheExceptionpublic abstract V get(KeyLock keyLock, K key, Object... parameters) throws CacheException
get in interface LockingCache<K,V>CacheExceptionpublic abstract V remove(KeyLock keyLock, K key) throws CacheException
remove in interface LockingCache<K,V>CacheExceptionprotected E getExistingEntry(KeyLock keyLock, K key) throws CacheException
CacheExceptionprotected E createNewEntry(K key, Object... parameters) throws CacheException
CacheExceptionprotected E retrieveEntry(KeyLock keyLock, K key) throws CacheException
CacheExceptionprotected E implantReference(CacheReference<K,E> cacheReference) throws CacheException
CacheExceptionpublic String getCacheName()
getCacheName in interface LockingCache<K,V>public int size()
size in interface LockingCache<K,V>public void clear()
clear in interface LockingCache<K,V>public void validate(KeyLock keyLock, CacheValidationPolicy<E> cacheValidationPolicy) throws CacheException
CacheExceptionpublic boolean exists(KeyLock keyLock, K key) throws CacheException
exists in interface LockingCache<K,V>CacheExceptionpublic V put(KeyLock keyLock, K key, V value) throws CacheException
put in interface LockingCache<K,V>CacheExceptionpublic V putIfAbsent(KeyLock keyLock, K key, V value)
putIfAbsent in interface LockingCache<K,V>public boolean isClosed()
isClosed in interface LockingCache<K,V>public void close()
close in interface LockingCache<K,V>Copyright © 2012. All Rights Reserved.