com.bigdata.cache
Interface IWeakRefCacheEntryFactory<K,T>

All Known Implementing Classes:
SoftCacheEntryFactory, WeakCacheEntryFactory

public interface IWeakRefCacheEntryFactory<K,T>

Interface supports choice of either weak or soft references for cache entries and makes it possible for the application to extend the metadata associated with and entry in the WeakValueCache.

Version:
$Id: IWeakRefCacheEntryFactory.java 2265 2009-10-26 12:51:06Z thompsonbry $
Author:
thompsonbry

Method Summary
 IWeakRefCacheEntry<K,T> newCacheEntry(K key, T obj, ReferenceQueue<T> queue)
          Creates a weak reference object to serve as the value in the cache for the given application object.
 

Method Detail

newCacheEntry

IWeakRefCacheEntry<K,T> newCacheEntry(K key,
                                      T obj,
                                      ReferenceQueue<T> queue)
Creates a weak reference object to serve as the value in the cache for the given application object.

Parameters:
key - The object identifier.
obj - The application object.
queue - The weak or soft reference object must be created such that it will appear on this queue when the reference is cleared by the garbage collector.
Returns:
The new cache entry for that application object.
See Also:
WeakReference, SoftReference


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