public class CachingSupplier<T>
extends java.lang.Object
implements java.util.function.Supplier<T>
Refreshes the value if 30 seconds have passed since the last call.
Constructor and Description |
---|
CachingSupplier(java.util.function.Supplier<T> original) |
CachingSupplier(java.util.function.Supplier<T> original,
long timeToLive) |
Modifier and Type | Method and Description |
---|---|
T |
get() |
long |
getCacheTime() |
boolean |
isCached() |