org.smallmind.quorum.cache.indigenous
Class OrderedCache<D extends CacheMetaData,K,V,E extends OrderedCacheEntry<D,V>>

java.lang.Object
  extended by org.smallmind.quorum.cache.LockingCacheEnforcer<K,V>
      extended by org.smallmind.quorum.cache.indigenous.AbstractCache<K,V,E>
          extended by org.smallmind.quorum.cache.indigenous.OrderedCache<D,K,V,E>
All Implemented Interfaces:
LockingCache<K,V>

public class OrderedCache<D extends CacheMetaData,K,V,E extends OrderedCacheEntry<D,V>>
extends AbstractCache<K,V,E>


Constructor Summary
OrderedCache(String cacheName, CacheSource<K,V,E> cacheSource, CacheAccumulator<D,K,E> cacheAccumulator, Comparator<D> metaDataComparator)
           
OrderedCache(String cacheName, CacheSource<K,V,E> cacheSource, CacheAccumulator<D,K,E> cacheAccumulator, Comparator<D> metaDataComparator, CacheExpirationPolicy<E> cacheExpirationPolicy)
           
OrderedCache(String cacheName, CacheSource<K,V,E> cacheSource, CacheAccumulator<D,K,E> cacheAccumulator, Comparator<D> metaDataComparator, CacheExpirationPolicy<E> cacheExpirationPolicy, int initialCapacity, float loadFactor, int concurrencyLevel)
           
OrderedCache(String cacheName, CacheSource<K,V,E> cacheSource, CacheAccumulator<D,K,E> cacheAccumulator, Comparator<D> metaDataComparator, CacheExpirationPolicy<E> cacheExpirationPolicy, int initialCapacity, float loadFactor, int concurrencyLevel, long externalLockTimeout)
           
OrderedCache(String cacheName, CacheSource<K,V,E> cacheSource, CacheAccumulator<D,K,E> cacheAccumulator, Comparator<D> metaDataComparator, int initialCapacity, float loadFactor, int concurrencyLevel)
           
OrderedCache(String cacheName, CacheSource<K,V,E> cacheSource, CacheAccumulator<D,K,E> cacheAccumulator, Comparator<D> metaDataComparator, int initialCapacity, float loadFactor, int concurrencyLevel, long externalLockTimeout)
           
 
Method Summary
 V get(KeyLock keyLock, K key, Object... parameters)
           
protected  E implantReference(CacheReference<K,E> cacheReference)
           
 V remove(KeyLock keyLock, K key)
           
 
Methods inherited from class org.smallmind.quorum.cache.indigenous.AbstractCache
clear, close, createNewEntry, exists, expireEntry, getCacheName, getExistingEntry, getKeyIterator, isClosed, put, putIfAbsent, retrieveEntry, size, validate
 
Methods inherited from class org.smallmind.quorum.cache.LockingCacheEnforcer
executeLockedCallback, gateKey, getLockTimeout, getStripeLockArray, lock, lockStripe, unlock
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.smallmind.quorum.cache.LockingCache
executeLockedCallback, getLockTimeout, lock, unlock
 

Constructor Detail

OrderedCache

public OrderedCache(String cacheName,
                    CacheSource<K,V,E> cacheSource,
                    CacheAccumulator<D,K,E> cacheAccumulator,
                    Comparator<D> metaDataComparator)
             throws CacheException
Throws:
CacheException

OrderedCache

public OrderedCache(String cacheName,
                    CacheSource<K,V,E> cacheSource,
                    CacheAccumulator<D,K,E> cacheAccumulator,
                    Comparator<D> metaDataComparator,
                    int initialCapacity,
                    float loadFactor,
                    int concurrencyLevel)
             throws CacheException
Throws:
CacheException

OrderedCache

public OrderedCache(String cacheName,
                    CacheSource<K,V,E> cacheSource,
                    CacheAccumulator<D,K,E> cacheAccumulator,
                    Comparator<D> metaDataComparator,
                    int initialCapacity,
                    float loadFactor,
                    int concurrencyLevel,
                    long externalLockTimeout)
             throws CacheException
Throws:
CacheException

OrderedCache

public OrderedCache(String cacheName,
                    CacheSource<K,V,E> cacheSource,
                    CacheAccumulator<D,K,E> cacheAccumulator,
                    Comparator<D> metaDataComparator,
                    CacheExpirationPolicy<E> cacheExpirationPolicy)
             throws CacheException
Throws:
CacheException

OrderedCache

public OrderedCache(String cacheName,
                    CacheSource<K,V,E> cacheSource,
                    CacheAccumulator<D,K,E> cacheAccumulator,
                    Comparator<D> metaDataComparator,
                    CacheExpirationPolicy<E> cacheExpirationPolicy,
                    int initialCapacity,
                    float loadFactor,
                    int concurrencyLevel)
             throws CacheException
Throws:
CacheException

OrderedCache

public OrderedCache(String cacheName,
                    CacheSource<K,V,E> cacheSource,
                    CacheAccumulator<D,K,E> cacheAccumulator,
                    Comparator<D> metaDataComparator,
                    CacheExpirationPolicy<E> cacheExpirationPolicy,
                    int initialCapacity,
                    float loadFactor,
                    int concurrencyLevel,
                    long externalLockTimeout)
             throws CacheException
Throws:
CacheException
Method Detail

remove

public V remove(KeyLock keyLock,
                K key)
         throws CacheException
Specified by:
remove in interface LockingCache<K,V>
Specified by:
remove in class AbstractCache<K,V,E extends OrderedCacheEntry<D,V>>
Throws:
CacheException

get

public V get(KeyLock keyLock,
             K key,
             Object... parameters)
      throws CacheException
Specified by:
get in interface LockingCache<K,V>
Specified by:
get in class AbstractCache<K,V,E extends OrderedCacheEntry<D,V>>
Throws:
CacheException

implantReference

protected E implantReference(CacheReference<K,E> cacheReference)
                                                     throws CacheException
Overrides:
implantReference in class AbstractCache<K,V,E extends OrderedCacheEntry<D,V>>
Throws:
CacheException


Copyright © 2011. All Rights Reserved.