com.bigdata.cache
Class ConcurrentWeakValueCacheWithTimeout<K,V>

java.lang.Object
  extended by com.bigdata.cache.ConcurrentWeakValueCache<K,V>
      extended by com.bigdata.cache.ConcurrentWeakValueCacheWithTimeout<K,V>
All Implemented Interfaces:
IConcurrentWeakValueCache<K,V>
Direct Known Subclasses:
IndexManager.IndexCache

public class ConcurrentWeakValueCacheWithTimeout<K,V>
extends ConcurrentWeakValueCache<K,V>

Extends the basic behavior to clear stale references from a backing hard reference queue. The weak reference values for entries whose hard reference is cleared from the backing hard reference queue WILL NOT be cleared from this map as long as those references remain strongly reachable.

Version:
$Id: ConcurrentWeakValueCacheWithTimeout.java 2265 2009-10-26 12:51:06Z thompsonbry $
Author:
Bryan Thompson
See Also:
SynchronizedHardReferenceQueueWithTimeout

Nested Class Summary
 
Nested classes/interfaces inherited from class com.bigdata.cache.ConcurrentWeakValueCache
ConcurrentWeakValueCache.WeakRef<K,V>
 
Field Summary
 
Fields inherited from class com.bigdata.cache.ConcurrentWeakValueCache
DEBUG, INFO, log
 
Constructor Summary
ConcurrentWeakValueCacheWithTimeout(int queueCapacity, float loadFactor, int concurrencyLevel, long timeout)
          Ctor variant using a SynchronizedHardReferenceQueueWithTimeout with the specified capacity, timeout for stale references, and the specified concurrency level for the inner ConcurrentHashMap used by this class.
ConcurrentWeakValueCacheWithTimeout(int queueCapacity, long timeout)
          Ctor variant using a SynchronizedHardReferenceQueueWithTimeout with the specified capacity and timeout for stale references.
 
Method Summary
 
Methods inherited from class com.bigdata.cache.ConcurrentWeakValueCache
capacity, clear, containsKey, didUpdate, entryIterator, get, isRemoveClearedReferences, iterator, newWeakRef, put, putIfAbsent, remove, removeClearedEntries, removeMapEntry, size
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConcurrentWeakValueCacheWithTimeout

public ConcurrentWeakValueCacheWithTimeout(int queueCapacity,
                                           long timeout)
Ctor variant using a SynchronizedHardReferenceQueueWithTimeout with the specified capacity and timeout for stale references.

Parameters:
timeout - The timeout in nanoseconds.

ConcurrentWeakValueCacheWithTimeout

public ConcurrentWeakValueCacheWithTimeout(int queueCapacity,
                                           float loadFactor,
                                           int concurrencyLevel,
                                           long timeout)
Ctor variant using a SynchronizedHardReferenceQueueWithTimeout with the specified capacity, timeout for stale references, and the specified concurrency level for the inner ConcurrentHashMap used by this class.

Parameters:
timeout - The timeout in nanoseconds.


Copyright © 2006-2009 SYSTAP, LLC. All Rights Reserved.