Package graphql.util

Class InterThreadMemoizedSupplier<T>

  • Type Parameters:
    T - for two
    All Implemented Interfaces:
    java.util.function.Supplier<T>

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

      • delegate

        private final java.util.function.Supplier<T> delegate
      • initialized

        private volatile boolean initialized
      • value

        private T value
    • Constructor Detail

      • InterThreadMemoizedSupplier

        public InterThreadMemoizedSupplier​(java.util.function.Supplier<T> delegate)
    • Method Detail

      • get

        public T get()
        Specified by:
        get in interface java.util.function.Supplier<T>