Package com.yahoo.processing.response
Class AbstractDataList.DrainOnGetFuture<DATATYPE extends Data>
- java.lang.Object
-
- java.util.concurrent.CompletableFuture<V>
-
- com.yahoo.processing.impl.ProcessingFuture<DataList<DATATYPE>>
-
- com.yahoo.processing.response.AbstractDataList.DrainOnGetFuture<DATATYPE>
-
- All Implemented Interfaces:
com.google.common.util.concurrent.ListenableFuture<DataList<DATATYPE>>
,CompletionStage<DataList<DATATYPE>>
,Future<DataList<DATATYPE>>
- Enclosing class:
- AbstractDataList<DATATYPE extends Data>
public static final class AbstractDataList.DrainOnGetFuture<DATATYPE extends Data> extends ProcessingFuture<DataList<DATATYPE>>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class java.util.concurrent.CompletableFuture
CompletableFuture.AsynchronousCompletionTask
-
-
Constructor Summary
Constructors Constructor Description DrainOnGetFuture(DataList<DATATYPE> owner)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
cancel(boolean b)
Returns false as this is not cancellableDataList<DATATYPE>
get()
Wait until all data is available.DataList<DATATYPE>
get(long timeout, TimeUnit timeUnit)
Wait until all data is available.boolean
isCancelled()
Returns false as this is not cancellable-
Methods inherited from class com.yahoo.processing.impl.ProcessingFuture
addListener
-
Methods inherited from class java.util.concurrent.CompletableFuture
acceptEither, acceptEitherAsync, acceptEitherAsync, allOf, anyOf, applyToEither, applyToEitherAsync, applyToEitherAsync, complete, completeAsync, completeAsync, completedFuture, completedStage, completeExceptionally, completeOnTimeout, copy, defaultExecutor, delayedExecutor, delayedExecutor, exceptionally, failedFuture, failedStage, getNow, getNumberOfDependents, handle, handleAsync, handleAsync, isCompletedExceptionally, isDone, join, minimalCompletionStage, newIncompleteFuture, obtrudeException, obtrudeValue, orTimeout, runAfterBoth, runAfterBothAsync, runAfterBothAsync, runAfterEither, runAfterEitherAsync, runAfterEitherAsync, runAsync, runAsync, supplyAsync, supplyAsync, thenAccept, thenAcceptAsync, thenAcceptAsync, thenAcceptBoth, thenAcceptBothAsync, thenAcceptBothAsync, thenApply, thenApplyAsync, thenApplyAsync, thenCombine, thenCombineAsync, thenCombineAsync, thenCompose, thenComposeAsync, thenComposeAsync, thenRun, thenRunAsync, thenRunAsync, toCompletableFuture, toString, whenComplete, whenCompleteAsync, whenCompleteAsync
-
-
-
-
Method Detail
-
cancel
public boolean cancel(boolean b)
Returns false as this is not cancellable
-
isCancelled
public boolean isCancelled()
Returns false as this is not cancellable- Specified by:
isCancelled
in interfaceFuture<DATATYPE extends Data>
- Overrides:
isCancelled
in classProcessingFuture<DataList<DATATYPE extends Data>>
-
get
public DataList<DATATYPE> get() throws InterruptedException, ExecutionException
Wait until all data is available. When this returns all data is available in the returned data list.- Specified by:
get
in interfaceFuture<DATATYPE extends Data>
- Specified by:
get
in classProcessingFuture<DataList<DATATYPE extends Data>>
- Throws:
InterruptedException
ExecutionException
-
get
public DataList<DATATYPE> get(long timeout, TimeUnit timeUnit) throws InterruptedException, ExecutionException, TimeoutException
Wait until all data is available. When and if this returns normally all data is available in the returned data list- Specified by:
get
in interfaceFuture<DATATYPE extends Data>
- Specified by:
get
in classProcessingFuture<DataList<DATATYPE extends Data>>
- Throws:
InterruptedException
ExecutionException
TimeoutException
-
-