Class CachedSupplier<T>

java.lang.Object
com.yahoo.lang.CachedSupplier<T>
All Implemented Interfaces:
Supplier<T>

public class CachedSupplier<T> extends Object implements Supplier<T>
Supplier that caches the value for a given duration with ability to invalidate on demand. Is thread safe.
Author:
freva
  • Constructor Details

  • Method Details

    • get

      public T get()
      Specified by:
      get in interface Supplier<T>
    • invalidate

      public void invalidate()