org.kuali.rice.core.util
Class MaxAgeSoftReference<T>

java.lang.Object
  extended by java.lang.ref.Reference<T>
      extended by java.lang.ref.SoftReference<T>
          extended by org.kuali.rice.core.util.MaxAgeSoftReference<T>

public class MaxAgeSoftReference<T>
extends SoftReference<T>

An extension to SoftReference that stores an expiration time for the value stored in the SoftReference. If no expiration time is passed in the value will never be cached.


Field Summary
private  long expires
           
 
Constructor Summary
MaxAgeSoftReference(long expires, T referent)
           
 
Method Summary
 T get()
           
 boolean isValid()
           
 
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
 

Field Detail

expires

private long expires
Constructor Detail

MaxAgeSoftReference

public MaxAgeSoftReference(long expires,
                           T referent)
Method Detail

isValid

public boolean isValid()

get

public T get()
Overrides:
get in class SoftReference<T>


Copyright © 2004-2011 The Kuali Foundation. All Rights Reserved.