Class CachingComposingSupplier<T,U>

java.lang.Object
com.google.cloud.spring.data.spanner.core.admin.CachingComposingSupplier<T,U>
Type Parameters:
T - the type of objects this supplier produces.
U - the type of objects this supplier bases its products on.
All Implemented Interfaces:
Supplier<T>

public class CachingComposingSupplier<T,U> extends Object implements Supplier<T>
A supplier of objects that relies on another supplier and caches provided results.
  • Constructor Details

    • CachingComposingSupplier

      public CachingComposingSupplier(Supplier<U> inputProvider, Function<U,T> producer)
      Constructor.
      Parameters:
      inputProvider - the provider that gives inputs for each product of this provider.
      producer - the function that returns products of this provider given inputs.
  • Method Details

    • get

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