Package org.apache.cassandra.utils
Class RecomputingSupplier<T>
java.lang.Object
org.apache.cassandra.utils.RecomputingSupplier<T>
Supplier that caches the last computed value until it is reset, forcing every caller of
get(long, TimeUnit) to wait until this value is computed if
it was not computed yet.
Calling recompute() won't reset value for the already
waiting consumers, but instead will schedule one recomputation as soon as current one is done.-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
RecomputingSupplier
-
-
Method Details
-
recompute
public void recompute() -
get
public T get(long timeout, TimeUnit timeUnit) throws InterruptedException, ExecutionException, TimeoutException -
toString
-