Class ResultVoidingFuture
java.lang.Object
com.github.mizool.core.concurrent.ResultVoidingFuture
@Deprecated(since="0.41")
public class ResultVoidingFuture
extends Object
implements com.google.common.util.concurrent.ListenableFuture<Void>
Deprecated.
Transforms any
Note that the reference to the original future is discarded as soon as possible. That allows to reduce the overall memory footprint when working with multiple futures at once without caring for the results.
ListenableFuture
into a ListenableFuture
without result. Exceptions that are thrown by the original future
are handled transparently.Note that the reference to the original future is discarded as soon as possible. That allows to reduce the overall memory footprint when working with multiple futures at once without caring for the results.
-
Constructor Summary
ConstructorsConstructorDescriptionResultVoidingFuture
(com.google.common.util.concurrent.ListenableFuture<T> target) Deprecated.Use the factory methodFutures.toVoidResult(ListenableFuture)
instead. -
Method Summary
-
Constructor Details
-
ResultVoidingFuture
@Deprecated(since="0.41") public ResultVoidingFuture(com.google.common.util.concurrent.ListenableFuture<T> target) Deprecated.Use the factory methodFutures.toVoidResult(ListenableFuture)
instead. This class will cease to be public at some point.
-
-
Method Details
-
get
public Void get(long timeout, TimeUnit unit) throws InterruptedException, TimeoutException, ExecutionException Deprecated.- Specified by:
get
in interfaceFuture<Void>
- Throws:
InterruptedException
TimeoutException
ExecutionException
-
get
Deprecated.- Specified by:
get
in interfaceFuture<Void>
- Throws:
InterruptedException
ExecutionException
-
isDone
public boolean isDone()Deprecated. -
isCancelled
public boolean isCancelled()Deprecated.- Specified by:
isCancelled
in interfaceFuture<Void>
-
cancel
public boolean cancel(boolean mayInterruptIfRunning) Deprecated. -
addListener
Deprecated.- Specified by:
addListener
in interfacecom.google.common.util.concurrent.ListenableFuture<Void>
-
Futures.toVoidResult(ListenableFuture)
instead. This class will cease to be public at some point.