Holger's
Java API

com.antelmann.util
Class SoftHolder<T>

java.lang.Object
  extended by com.antelmann.util.ReferenceHolder<T>
      extended by com.antelmann.util.SoftHolder<T>
All Implemented Interfaces:
Refreshable, ValueRetriever<T>, Wrapped<ValueRetriever<T>>

public class SoftHolder<T>
extends ReferenceHolder<T>

useful to cache a large value 'softly' through a ValueRetriever using a SoftReference and very easy to use. If the reference is garbage collected, the value is re-retrieved via the embedded ValueRetriever.

Since:
29.05.2011, 19:33:41
Author:
Holger Antelmann

Constructor Summary
SoftHolder(ValueRetriever<T> retriever)
           
 
Method Summary
 
Methods inherited from class com.antelmann.util.ReferenceHolder
clear, getRelevantValue, getValue, isAvailable, isWired, refreshContent, setCurrentValue, setRetriever, setWired, unwrap
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SoftHolder

public SoftHolder(ValueRetriever<T> retriever)


(c) Holger Antelmann since 2001- all rights reserved (contact: info@antelmann.com)
see www.antelmann.com/developer for further details and available downloads