@NotThreadSafe public final class VortexAggregateFuture<TInput,TOutput> extends Object implements VortexFutureDelegate<TOutput>
Constructor and Description |
---|
VortexAggregateFuture(Executor executor,
Map<Integer,TInput> taskletIdInputMap,
FutureCallback<AggregateResult<TInput,TOutput>> callbackHandler) |
Modifier and Type | Method and Description |
---|---|
void |
aggregationCompleted(List<Integer> taskletIds,
TOutput result)
Aggregation has completed for a list of Tasklets, with an aggregated result.
|
void |
aggregationThrewException(List<Integer> taskletIds,
Exception exception)
A list of Tasklets has failed during aggregation phase.
|
void |
cancelled(int taskletId)
Not implemented for local aggregation.
|
void |
completed(int taskletId,
TOutput result)
A Tasklet associated with the aggregation has completed.
|
AggregateResultSynchronous<TInput,TOutput> |
get() |
AggregateResultSynchronous<TInput,TOutput> |
get(long timeout,
TimeUnit timeUnit) |
boolean |
isDone() |
void |
threwException(int taskletId,
Exception exception)
A Tasklet associated with the aggregation has failed.
|
public VortexAggregateFuture(Executor executor, Map<Integer,TInput> taskletIdInputMap, FutureCallback<AggregateResult<TInput,TOutput>> callbackHandler)
public AggregateResultSynchronous<TInput,TOutput> get() throws InterruptedException
InterruptedException
public AggregateResultSynchronous<TInput,TOutput> get(long timeout, TimeUnit timeUnit) throws InterruptedException, TimeoutException
timeout
- the timeout for the operation.timeUnit
- the time unit of the timeout.TimeoutException
- if time out hits.InterruptedException
public boolean isDone()
public void completed(int taskletId, TOutput result)
completed
in interface VortexFutureDelegate<TOutput>
public void aggregationCompleted(List<Integer> taskletIds, TOutput result)
aggregationCompleted
in interface VortexFutureDelegate<TOutput>
public void threwException(int taskletId, Exception exception)
threwException
in interface VortexFutureDelegate<TOutput>
public void aggregationThrewException(List<Integer> taskletIds, Exception exception)
aggregationThrewException
in interface VortexFutureDelegate<TOutput>
public void cancelled(int taskletId)
cancelled
in interface VortexFutureDelegate<TOutput>
Copyright © 2017 The Apache Software Foundation. All rights reserved.