Class CachedComposedSupplier<T,​R>

  • All Implemented Interfaces:
    Supplier<R>

    public class CachedComposedSupplier<T,​R>
    extends Object
    implements Supplier<R>
    A version of composed supplier that caches the result of applying the function to the value supplied by the underlying supplier of VersionedType. The result is recomputed if and only if the returned version increased since last call to get(), or a specified amount of time has elapsed since the returned version has changed. Intended to be used when applying the function is expensive and the versioned type is expected to be updated less frequently than calls to get().