Holger's
Java API

com.antelmann.util
Class WeakHolder<T>

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

public class WeakHolder<T>
extends ReferenceHolder<T>

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

Since:
27.06.2015
Author:
Holger Antelmann

Constructor Summary
WeakHolder(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

WeakHolder

public WeakHolder(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