Interface CachedSupplier.PrefetchStrategy

    • Method Detail

      • prefetch

        void prefetch​(Runnable valueUpdater)
        Execute the provided value updater to update the cache. The specific implementation defines how this is invoked.
      • fetch

        default <T> RefreshResult<T> fetch​(Supplier<RefreshResult<T>> supplier)
        Invoke the provided supplier to retrieve the refresh result. This is useful for prefetch strategies to override when they care about the refresh result.
      • initializeCachedSupplier

        default void initializeCachedSupplier​(CachedSupplier<?> cachedSupplier)
        Invoked when the prefetch strategy is registered with a CachedSupplier.