Class ManagedSupplier<T>

  • All Implemented Interfaces:
    java.lang.AutoCloseable, java.lang.Iterable<T>, java.util.function.Supplier<T>, AutoFunctional, AutoSupplier<T>

    final class ManagedSupplier<T>
    extends java.lang.Object
    implements AutoSupplier<T>
    • Constructor Summary

      Constructors 
      Constructor Description
      ManagedSupplier​(Throughput manager, java.util.function.Supplier<T> supplier)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()  
      T read()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.lang.Iterable

        forEach, spliterator
    • Field Detail

      • mySupplier

        private final java.util.function.Supplier<T> mySupplier
    • Constructor Detail

      • ManagedSupplier

        ManagedSupplier​(Throughput manager,
                        java.util.function.Supplier<T> supplier)
    • Method Detail

      • close

        public void close()
                   throws java.lang.Exception
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface AutoSupplier<T>
        Throws:
        java.lang.Exception