public class GridCompoundFuture<T,R> extends GridFutureAdapter<R> implements IgniteInClosure<IgniteInternalFuture<T>>
| Constructor and Description |
|---|
GridCompoundFuture()
Default constructor.
|
GridCompoundFuture(@Nullable IgniteReducer<T,R> rdc) |
| Modifier and Type | Method and Description |
|---|---|
GridCompoundFuture<T,R> |
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 |
futuresCountNoLock() |
protected boolean |
hasFutures() |
protected 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() |
protected void |
logDebug(IgniteLogger log,
String msg) |
protected void |
logError(IgniteLogger log,
String msg,
Throwable e) |
GridCompoundFuture<T,R> |
markInitialized()
Mark this future as initialized.
|
protected boolean |
processFailure(Throwable err,
IgniteInternalFuture<T> fut)
Processes error thrown by some of the inner futures.
|
String |
toString() |
chain, chain, error, get, get, get, getUninterruptibly, ignoreInterrupts, isCancelled, isDone, isFailed, listen, logger, onCancelled, onDone, onDone, onDone, onDone, onDone, reset, resultpublic GridCompoundFuture()
public GridCompoundFuture(@Nullable
@Nullable IgniteReducer<T,R> rdc)
rdc - Reducer.public final 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 final Collection<IgniteInternalFuture<T>> futures()
protected boolean ignoreFailure(Throwable err)
err - Exception to check.True if this error should be ignored.protected boolean processFailure(Throwable err, IgniteInternalFuture<T> fut)
err - Thrown exception.fut - Failed future.True if this error should be ignored.protected final boolean hasPending()
GridFutureAdapter.isDone() because child classes may override GridFutureAdapter.onDone(Object, Throwable)
call and delay completion.True if there are pending futures.public final GridCompoundFuture<T,R> add(IgniteInternalFuture<T> fut)
fut - Future to add.protected final void clear()
public final boolean initialized()
True if this future was initialized. Initialization happens when markInitialized()
method is called on future.public final GridCompoundFuture<T,R> markInitialized()
protected void logError(IgniteLogger log, String msg, Throwable e)
log - IgniteLogger.msg - ShortMessage.e - Exception.protected void logDebug(IgniteLogger log, String msg)
log - IgniteLogger.msg - ShortMessage.protected final IgniteInternalFuture<T> future(int idx)
idx - - index index of the element to returnprotected final int futuresCountNoLock()
protected final boolean hasFutures()
True if has at least one future.public String toString()
toString in class GridFutureAdapter<R>
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.11.1 Release Date : December 20 2021