Class CachingSupplier<T>
- java.lang.Object
-
- com.djrapitops.plan.delivery.domain.container.CachingSupplier<T>
-
- All Implemented Interfaces:
java.util.function.Supplier<T>
public class CachingSupplier<T> extends java.lang.Object implements java.util.function.Supplier<T>
Caching layer between Supplier and caller.Refreshes the value if 30 seconds have passed since the last call.
-
-
Constructor Summary
Constructors Constructor Description CachingSupplier(java.util.function.Supplier<T> original)
CachingSupplier(java.util.function.Supplier<T> original, long timeToLive)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description T
get()
-