private static final class ClosingFuture.CloseableList
extends java.util.IdentityHashMap<java.lang.AutoCloseable,java.util.concurrent.Executor>
implements java.io.Closeable
Modifier and Type | Field and Description |
---|---|
private boolean |
closed |
private ClosingFuture.DeferredCloser |
closer |
private java.util.concurrent.CountDownLatch |
whenClosed |
Modifier | Constructor and Description |
---|---|
private |
CloseableList() |
Modifier and Type | Method and 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.
|
clear, clone, containsKey, containsValue, entrySet, equals, forEach, get, hashCode, isEmpty, keySet, put, putAll, remove, replaceAll, size, values
private final ClosingFuture.DeferredCloser closer
private volatile boolean closed
@CheckForNull private volatile java.util.concurrent.CountDownLatch whenClosed
<V,U> ListenableFuture<U> applyClosingFunction(ClosingFuture.ClosingFunction<? super V,U> transformation, V input) throws java.lang.Exception
java.lang.Exception
<V,U> FluentFuture<U> applyAsyncClosingFunction(ClosingFuture.AsyncClosingFunction<V,U> transformation, V input) throws java.lang.Exception
java.lang.Exception
public void close()
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
void add(@CheckForNull java.lang.AutoCloseable closeable, java.util.concurrent.Executor executor)
java.util.concurrent.CountDownLatch whenClosedCountDown()