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

java.lang.Object
  extended by java.lang.ref.Reference<T>
      extended by java.lang.ref.SoftReference<T>
          extended by com.bigdata.cache.SoftCacheEntry<K,T>
All Implemented Interfaces:
IWeakRefCacheEntry<K,T>

public class SoftCacheEntry<K,T>
extends SoftReference<T>
implements IWeakRefCacheEntry<K,T>

Implementation based on SoftReference.

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

Constructor Summary
SoftCacheEntry(K key, T obj, ReferenceQueue<T> queue)
           
 
Method Summary
 K getKey()
          Returns the key for the object stored in the cache entry.
 T getObject()
          The object in the cache.
 
Methods inherited from class java.lang.ref.SoftReference
get
 
Methods inherited from class java.lang.ref.Reference
clear, enqueue, isEnqueued
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SoftCacheEntry

public SoftCacheEntry(K key,
                      T obj,
                      ReferenceQueue<T> queue)
Method Detail

getKey

public K getKey()
Description copied from interface: IWeakRefCacheEntry
Returns the key for the object stored in the cache entry. This is generally an object identifier (OID).

Specified by:
getKey in interface IWeakRefCacheEntry<K,T>

getObject

public T getObject()
Description copied from interface: IWeakRefCacheEntry
The object in the cache. If the entry belongs to a weak reference cache, then this method returns the weak referent or null iff the weak reference has been cleared.

Specified by:
getObject in interface IWeakRefCacheEntry<K,T>


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