Class AsyncRefreshableSupplier<V,E extends Exception>

java.lang.Object
org.forgerock.openig.tools.authentication.chf.AsyncRefreshableSupplier<V,E>
Type Parameters:
V - input type of the function parameter
E - supported exception type of the function parameter

public final class AsyncRefreshableSupplier<V,E extends Exception> extends Object
This utility class supports a lock-downgrading strategy to make sure that 2 concurrent calls to compute the "cached" value will result in a single computation. It supports concurrent refreshment.
  • Constructor Details

    • AsyncRefreshableSupplier

      public AsyncRefreshableSupplier(AsyncFunction<Context,V,E> compute)
      Creates a provider ensuring "only-once" invocation of the given compute function.
      Parameters:
      compute - computation function
  • Method Details