Package io.deephaven.util.datastructures
Class SoftCachingSupplier<OUTPUT_TYPE>
java.lang.Object
io.deephaven.util.datastructures.SoftCachingSupplier<OUTPUT_TYPE>
- Type Parameters:
OUTPUT_TYPE
- the type of results supplied by this supplier
- All Implemented Interfaces:
Supplier<OUTPUT_TYPE>
Supplier
wrapper that caches the result in a SoftReference
. Only suitable to wrap suppliers that are
safely repeatable and don't return null
.-
Constructor Summary
ConstructorDescriptionSoftCachingSupplier
(@NotNull Supplier<OUTPUT_TYPE> internalSupplier) Construct aSupplier
wrapper. -
Method Summary
-
Constructor Details
-
Method Details
-
get
- Specified by:
get
in interfaceSupplier<OUTPUT_TYPE>
-