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.Use the factory methodFutures.toVoidResult(ListenableFuture)instead. This class will cease to be public at some point.Transforms anyListenableFutureinto aListenableFuturewithout 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
Constructors Constructor Description ResultVoidingFuture(com.google.common.util.concurrent.ListenableFuture<T> target)Deprecated.Use the factory methodFutures.toVoidResult(ListenableFuture)instead.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidaddListener(Runnable listener, Executor exec)Deprecated.booleancancel(boolean mayInterruptIfRunning)Deprecated.Voidget()Deprecated.Voidget(long timeout, TimeUnit unit)Deprecated.booleanisCancelled()Deprecated.booleanisDone()Deprecated.
-
-
-
Constructor Detail
-
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 Detail
-
get
public Void get(long timeout, TimeUnit unit) throws InterruptedException, TimeoutException, ExecutionException
Deprecated.- Specified by:
getin interfaceFuture<Void>- Throws:
InterruptedExceptionTimeoutExceptionExecutionException
-
get
public Void get() throws InterruptedException, ExecutionException
Deprecated.- Specified by:
getin interfaceFuture<Void>- Throws:
InterruptedExceptionExecutionException
-
isCancelled
public boolean isCancelled()
Deprecated.- Specified by:
isCancelledin interfaceFuture<Void>
-
cancel
public boolean cancel(boolean mayInterruptIfRunning)
Deprecated.
-
-