public class GridCompoundFuture<T,R> extends GridFutureAdapter<R> implements IgniteInClosure<IgniteInternalFuture<T>>
AbstractQueuedSynchronizer.ConditionObject| Modifier and Type | Field and Description |
|---|---|
protected ArrayList<IgniteInternalFuture<T>> |
futs
Futures.
|
| Constructor and Description |
|---|
GridCompoundFuture()
Default constructor.
|
GridCompoundFuture(IgniteReducer<T,R> rdc) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(IgniteInternalFuture<T> fut)
Adds a future to this compound future.
|
void |
apply(IgniteInternalFuture<T> fut)
Closure body.
|
boolean |
cancel()
Default no-op implementation that always returns
false. |
Collection<IgniteInternalFuture<T>> |
futures()
Gets collection of futures.
|
protected int |
futuresSize() |
boolean |
hasPending()
Checks if there are pending futures.
|
protected boolean |
ignoreFailure(Throwable err)
Checks if this compound future should ignore this particular exception.
|
boolean |
initialized() |
void |
markInitialized()
Mark this future as initialized.
|
String |
toString() |
chain, duration, endTime, error, get, get, get, get0, getUninterruptibly, ignoreInterrupts, isCancelled, isDone, isFailed, listen, onCancelled, onDone, onDone, onDone, onDone, result, startTime, tryAcquireShared, tryReleaseSharedacquire, acquireInterruptibly, acquireShared, acquireSharedInterruptibly, compareAndSetState, getExclusiveQueuedThreads, getFirstQueuedThread, getQueuedThreads, getQueueLength, getSharedQueuedThreads, getState, getWaitingThreads, getWaitQueueLength, hasContended, hasQueuedPredecessors, hasQueuedThreads, hasWaiters, isHeldExclusively, isQueued, owns, release, releaseShared, setState, tryAcquire, tryAcquireNanos, tryAcquireSharedNanos, tryReleasegetExclusiveOwnerThread, setExclusiveOwnerThreadprotected final ArrayList<IgniteInternalFuture<T>> futs
public GridCompoundFuture()
public GridCompoundFuture(@Nullable
IgniteReducer<T,R> rdc)
rdc - Reducer.public void apply(IgniteInternalFuture<T> fut)
apply in interface IgniteInClosure<IgniteInternalFuture<T>>fut - Closure argument.public boolean cancel()
throws IgniteCheckedException
false.
Futures that do support cancellation should override this method
and call GridFutureAdapter.onCancelled() callback explicitly if cancellation
indeed did happen.cancel in interface IgniteInternalFuture<R>cancel in class GridFutureAdapter<R>True if future was canceled (i.e. was not finished prior to this call).IgniteCheckedException - If cancellation failed.public Collection<IgniteInternalFuture<T>> futures()
protected boolean ignoreFailure(Throwable err)
err - Exception to check.True if this error should be ignored.public boolean hasPending()
GridFutureAdapter.isDone() because child classes may override GridFutureAdapter.onDone(Object, Throwable)
call and delay completion.True if there are pending futures.public void add(IgniteInternalFuture<T> fut)
fut - Future to add.public boolean initialized()
True if this future was initialized. Initialization happens when
markInitialized() method is called on future.public void markInitialized()
protected int futuresSize()
public String toString()
toString in class GridFutureAdapter<R>
Follow @ApacheIgnite
Ignite Fabric : ver. 1.7.0 Release Date : August 1 2016