Package graphql.util

Class InterThreadMemoizedSupplier<T>

java.lang.Object
graphql.util.InterThreadMemoizedSupplier<T>
Type Parameters:
T - for two
All Implemented Interfaces:
Supplier<T>

public class InterThreadMemoizedSupplier<T> extends Object implements Supplier<T>
This memoizing supplier DOES use locked double locking to set its value.
  • Field Details

    • delegate

      private final Supplier<T> delegate
    • initialized

      private volatile boolean initialized
    • lock

      private final LockKit.ReentrantLock lock
    • value

      private T value
  • Constructor Details

    • InterThreadMemoizedSupplier

      public InterThreadMemoizedSupplier(Supplier<T> delegate)
  • Method Details

    • get

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