public class GridCompoundFuture<T,R> extends GridFutureAdapter<R> implements IgniteInClosure<IgniteInternalFuture<T>>
AbstractQueuedSynchronizer.ConditionObject| 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. |
protected void |
clear()
Clear futures.
|
protected IgniteInternalFuture<T> |
future(int idx)
Returns future at the specified position in this list.
|
Collection<IgniteInternalFuture<T>> |
futures()
Gets collection of futures.
|
protected int |
futuresCount() |
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, logger, 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 Object sync
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.protected void clear()
public boolean initialized()
True if this future was initialized. Initialization happens when markInitialized()
method is called on future.public void markInitialized()
protected IgniteInternalFuture<T> future(int idx)
idx - - index index of the element to returnprotected int futuresCount()
public String toString()
toString in class GridFutureAdapter<R>
Follow @ApacheIgnite
Ignite Fabric : ver. 1.8.0 Release Date : December 5 2016