Class ClosingFuture.CloseableList

  • All Implemented Interfaces:
    java.io.Closeable, java.io.Serializable, java.lang.AutoCloseable, java.lang.Cloneable, java.util.Map<java.lang.AutoCloseable,​java.util.concurrent.Executor>
    Enclosing class:
    ClosingFuture<V>

    private static final class ClosingFuture.CloseableList
    extends java.util.IdentityHashMap<java.lang.AutoCloseable,​java.util.concurrent.Executor>
    implements java.io.Closeable
    • Nested Class Summary

      • Nested classes/interfaces inherited from class java.util.AbstractMap

        java.util.AbstractMap.SimpleEntry<K extends java.lang.Object,​V extends java.lang.Object>, java.util.AbstractMap.SimpleImmutableEntry<K extends java.lang.Object,​V extends java.lang.Object>
      • Nested classes/interfaces inherited from interface java.util.Map

        java.util.Map.Entry<K extends java.lang.Object,​V extends java.lang.Object>
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private CloseableList()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) void add​(java.lang.AutoCloseable closeable, java.util.concurrent.Executor executor)  
      (package private) <V,​U>
      FluentFuture<U>
      applyAsyncClosingFunction​(ClosingFuture.AsyncClosingFunction<V,​U> transformation, V input)  
      (package private) <V,​U>
      ListenableFuture<U>
      applyClosingFunction​(ClosingFuture.ClosingFunction<? super V,​U> transformation, V input)  
      void close()  
      (package private) java.util.concurrent.CountDownLatch whenClosedCountDown()
      Returns a latch that reaches zero when this objects' deferred closeables have been closed.
      • Methods inherited from class java.util.IdentityHashMap

        clear, clone, containsKey, containsValue, entrySet, equals, forEach, get, hashCode, isEmpty, keySet, put, putAll, remove, replaceAll, size, values
      • Methods inherited from class java.util.AbstractMap

        toString
      • Methods inherited from class java.lang.Object

        finalize, getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.util.Map

        compute, computeIfAbsent, computeIfPresent, getOrDefault, merge, putIfAbsent, remove, replace, replace
    • Field Detail

      • closed

        private volatile boolean closed
      • whenClosed

        @CheckForNull
        private volatile java.util.concurrent.CountDownLatch whenClosed
    • Constructor Detail

      • CloseableList

        private CloseableList()
    • Method Detail

      • close

        public void close()
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
      • add

        void add​(@CheckForNull
                 java.lang.AutoCloseable closeable,
                 java.util.concurrent.Executor executor)
      • whenClosedCountDown

        java.util.concurrent.CountDownLatch whenClosedCountDown()
        Returns a latch that reaches zero when this objects' deferred closeables have been closed.