Class LazyRef<T>
java.lang.Object
org.aksw.commons.util.ref.LazyRef<T>
- 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:
-
Field Details
-
label
-
backendRefSupplier
-
closeDelayInMs
protected long closeDelayInMs -
backendRef
-
rootRef
-
timer
-
-
Constructor Details
-
LazyRef
protected LazyRef() -
LazyRef
-
-
Method Details
-
create
-
get
-
actualClose
protected void actualClose()
-