Type Parameters:
T -
All Implemented Interfaces:
Serializable , Supplier <Ref <T>>
A supplier for a ref backed by a root ref.
Calling .get() creates the root ref lazily if it does not yet exist.
Once the user ref is released, the release of the root ref is only scheduled.
Another request to .get() cancels a pending release.
Author:
raven
See Also:
Constructor Summary
Constructors
Method Summary
All Methods Static Methods Instance Methods Concrete Methods
Methods inherited from class java.lang.Object
clone , equals , finalize , getClass , hashCode , notify , notifyAll , toString , wait , wait , wait
Field Details
closeDelayInMs
protected long closeDelayInMs
backendRef
protected transient volatile Ref <T > backendRef
rootRef
protected transient volatile Ref <T > rootRef
timer
protected transient volatile Timer timer
Constructor Details
LazyRef
protected LazyRef ()
LazyRef
public LazyRef (String label,
Supplier <? extends Ref <T >> backendRefSupplier,
long closeDelayInMs)
Method Details
actualClose
protected void actualClose ()