org.apache.ignite.internal.processors.cache.distributed.near

## Class GridNearTxQueryResultsEnlistFuture

- java.lang.Object
- - org.apache.ignite.internal.util.future.GridFutureAdapter<R>
  - - org.apache.ignite.internal.util.future.GridCompoundFuture<T,T>
    - - org.apache.ignite.internal.util.future.GridCompoundIdentityFuture<T>
      - - org.apache.ignite.internal.processors.cache.GridCacheCompoundIdentityFuture<T>
        - - org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxAbstractEnlistFuture<Long>
          - - org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxQueryAbstractEnlistFuture
            - - org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxQueryResultsEnlistFuture

All Implemented Interfaces:
  Serializable, IgniteInternalFuture<Long>, GridCacheFuture<Long>, GridCacheVersionedFuture<Long>, IgniteInClosure<IgniteInternalFuture<Long>>

    public class GridNearTxQueryResultsEnlistFuture
    extends GridNearTxQueryAbstractEnlistFuture

A future tracking requests for remote nodes transaction enlisting and locking of entries produced with complex DML queries requiring reduce step.

See Also:
  Serialized Form

### Field Summary

Fields
`static int` `DFLT_BATCH_SIZE`

### Fields inherited from class org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxAbstractEnlistFuture

`cctx, futId, lockVer, log, mvccSnapshot, threadId, timeout, timeoutObj, topVer, tx`

### Constructor Summary

Constructors
Constructor and Description
`GridNearTxQueryResultsEnlistFuture(GridCacheContext<?,?> cctx, GridNearTxLocal tx, long timeout, UpdateSourceIterator<?> it, int batchSize, boolean sequential)`

### Method Summary

All Methods Instance Methods Concrete Methods
`boolean` `checkResponse(UUID nodeId, GridNearTxQueryResultsEnlistResponse res, Throwable err)`
`protected void` `map(boolean topLocked)` Start iterating the data rows and form batches.
`boolean` `onNodeLeft(UUID nodeId)` Callback for when node left.
`void` `onResult(UUID nodeId, GridNearTxQueryResultsEnlistResponse res)`
`Set<UUID>` `pendingResponseNodes()`
`String` `toString()`

### Methods inherited from class org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxAbstractEnlistFuture

`checkCompleted, clearLocalFuture, futureId, init, logDebug, logError, markNotTrackable, onCancelled, onDone, onOwnerChanged, remainingTime, timeoutException, trackable, updateLocalFuture, updateMappings, version`

### Methods inherited from class org.apache.ignite.internal.processors.cache.GridCacheCompoundIdentityFuture

`duration, startTime`

### Methods inherited from class org.apache.ignite.internal.util.future.GridCompoundFuture

`add, apply, cancel, clear, compoundsLockedExclusively, compoundsReadLock, compoundsReadUnlock, future, futures, futuresCountNoLock, hasFutures, hasPending, ignoreFailure, initialized, markInitialized, processFailure`

### Methods inherited from class org.apache.ignite.internal.util.future.GridFutureAdapter

`chain, chain, error, get, get, get, getUninterruptibly, ignoreInterrupts, isCancelled, isDone, isFailed, listen, logger, onDone, onDone, onDone, onDone, reset, result`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Methods inherited from interface org.apache.ignite.internal.processors.cache.GridCacheFuture

`duration, startTime`

### Methods inherited from interface org.apache.ignite.internal.IgniteInternalFuture

`cancel, chain, chain, error, get, get, get, getUninterruptibly, isCancelled, isDone, listen, result`

### Field Detail

#### DFLT_BATCH_SIZE

    public static final int DFLT_BATCH_SIZE

See Also:
  Constant Field Values

### Constructor Detail

#### GridNearTxQueryResultsEnlistFuture

    public GridNearTxQueryResultsEnlistFuture(GridCacheContext<?,?> cctx,
                                              GridNearTxLocal tx,
                                              long timeout,
                                              UpdateSourceIterator<?> it,
                                              int batchSize,
                                              boolean sequential)

Parameters:
  `cctx` - Cache context.
  `tx` - Transaction.
  `timeout` - Timeout.
  `it` - Rows iterator.
  `batchSize` - Batch size.
  `sequential` - Sequential locking flag.

### Method Detail

#### map

    protected void map(boolean topLocked)

Start iterating the data rows and form batches.

Specified by:
  `map` in class `GridNearTxAbstractEnlistFuture<Long>`
Parameters:
  `topLocked` - Whether topology was already locked.

#### onResult

    public void onResult(UUID nodeId,
                         GridNearTxQueryResultsEnlistResponse res)

Parameters:
  `nodeId` - Sender node id.
  `res` - Response.

#### onNodeLeft

    public boolean onNodeLeft(UUID nodeId)

Callback for when node left.

Parameters:
  `nodeId` - Left node ID.
Returns:
  `True` if future cared about this node.

#### checkResponse

    public boolean checkResponse(UUID nodeId,
                                 GridNearTxQueryResultsEnlistResponse res,
                                 Throwable err)

Parameters:
  `nodeId` - Originating node ID.
  `res` - Response.
  `err` - Exception.
Returns:
  `True` if future was completed by this call.

#### pendingResponseNodes

    public Set<UUID> pendingResponseNodes()

Specified by:
  `pendingResponseNodes` in class `GridNearTxAbstractEnlistFuture<Long>`
Returns:
  Nodes from which current future waits responses.

#### toString

    public String toString()

Overrides:
  `toString` in class `GridCompoundIdentityFuture<Long>`

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.12.0
Release Date | : January 10 2022