V- the type of the value of a successful operation
public static final class ClosingFuture.ValueAndCloser<V> extends Object
ClosingFutureoperation and allows the user to close all the closeable objects that were captured during it for later closing.
The asynchronous operation will have completed before this object is created.
public V get() throws ExecutionException
ClosingFuture, or throws an exception as
Because the asynchronous operation has already completed, this method is synchronous and returns immediately.
public void closeAsync()
ClosingFuture's asynchronous operation on the
Executors specified by calls to
If any such calls specified
MoreExecutors.directExecutor(), those objects will be
Idempotent: objects will be closed at most once.
Copyright © 2010–2021. All rights reserved.