com.bigdata.cache
Class WeakCacheEntryFactory<K,T>

java.lang.Object
  extended by com.bigdata.cache.WeakCacheEntryFactory<K,T>
All Implemented Interfaces:
IWeakRefCacheEntryFactory<K,T>

public class WeakCacheEntryFactory<K,T>
extends Object
implements IWeakRefCacheEntryFactory<K,T>

The default factory for WeakReference cache entries.

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

Constructor Summary
WeakCacheEntryFactory()
           
 
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WeakCacheEntryFactory

public WeakCacheEntryFactory()
Method Detail

newCacheEntry

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

Specified by:
newCacheEntry in interface IWeakRefCacheEntryFactory<K,T>
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.