public class GridStreamerStageExecutionFuture extends GridFutureAdapter<Object>
AbstractQueuedSynchronizer.ConditionObject| Constructor and Description |
|---|
GridStreamerStageExecutionFuture(IgniteStreamerEx streamer,
IgniteUuid execId,
int failoverAttemptCnt,
long execStartTs,
IgniteUuid parentFutId,
Collection<UUID> prevExecNodes,
String stageName,
Collection<?> evts) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
cancel()
Default no-op implementation that always returns
false. |
Map<UUID,GridStreamerExecutionBatch> |
childExecutions() |
Collection<Object> |
events() |
Collection<UUID> |
executionNodeIds() |
int |
failoverAttemptCount() |
IgniteUuid |
id() |
void |
map()
Sends execution requests to remote nodes or schedules local execution if events were mapped locally.
|
void |
metrics(StreamerMetricsHolder metricsHolder)
Sets metrics holder to update counters when future completes.
|
boolean |
onDone(Object res,
Throwable err)
Callback to notify that future is finished.
|
void |
onExecutionCompleted(UUID childNodeId,
Throwable err)
Callback invoked when child node reports execution is completed (successfully or not).
|
void |
onNodeLeft(UUID leftNodeId)
Callback invoked when node leaves the grid.
|
IgniteUuid |
parentFutureId()
If not root future, will return parent future ID.
|
boolean |
rootExecution() |
UUID |
senderNodeId()
If not root future, will return parent node ID (may be local node ID).
|
String |
stageName() |
String |
toString() |
chain, duration, endTime, error, get, get, get, get0, isCancelled, isDone, isFailed, listen, onCancelled, 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, setExclusiveOwnerThreadpublic GridStreamerStageExecutionFuture(IgniteStreamerEx streamer, @Nullable IgniteUuid execId, int failoverAttemptCnt, long execStartTs, @Nullable IgniteUuid parentFutId, @Nullable Collection<UUID> prevExecNodes, String stageName, Collection<?> evts)
streamer - Streamer extended context.execId - Execution ID. If parent future ID is null then this is a root future
and execution ID must be null.failoverAttemptCnt - Number of attempts this set of events was tried to failover.execStartTs - Execution start timestamp.parentFutId - Parent future ID.prevExecNodes - Node IDs on which pipeline was already executed.stageName - Stage name to run.evts - Events to process.public IgniteUuid id()
public void metrics(StreamerMetricsHolder metricsHolder)
metricsHolder - Metrics holder.public int failoverAttemptCount()
public String stageName()
public Collection<Object> events()
public void map()
public boolean rootExecution()
True if this future is a root execution future (i.e. initiated by streamer's addEvent call).@Nullable public UUID senderNodeId()
public IgniteUuid parentFutureId()
public Map<UUID,GridStreamerExecutionBatch> childExecutions()
public Collection<UUID> executionNodeIds()
public void onExecutionCompleted(UUID childNodeId, @Nullable Throwable err)
childNodeId - Child node ID.err - Exception if execution failed.public void onNodeLeft(UUID leftNodeId)
leftNodeId - Node ID that has left the grid.public boolean onDone(@Nullable Object res, @Nullable Throwable err)
null exception is passed in
the result value will be ignored.onDone in class GridFutureAdapter<Object>res - Optional result.err - Optional error.True if result was set by this call.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<Object>cancel in class GridFutureAdapter<Object>True if future was canceled (i.e. was not finished prior to this call).IgniteCheckedException - If cancellation failed.public String toString()
toString in class GridFutureAdapter<Object>
Follow @ApacheIgnite
Ignite Fabric : ver. 1.0.0-RC3 Release Date : March 24 2015