Package org.apache.ignite.internal.processors.cache.distributed.dht

## Class GridDhtTxFinishFuture<K,​V>

- 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<IgniteInternalTx>
        - - org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtTxFinishFuture<K,​V>

All Implemented Interfaces:
  `Serializable`, `IgniteDiagnosticAware`, `IgniteInternalFuture<IgniteInternalTx>`, `GridCacheFuture<IgniteInternalTx>`, `IgniteInClosure<IgniteInternalFuture<IgniteInternalTx>>`

    public final class GridDhtTxFinishFuture<K,​V>
    extends GridCacheCompoundIdentityFuture<IgniteInternalTx>
    implements IgniteDiagnosticAware

See Also:
  Serialized Form

### Constructor Summary

Constructors
`GridDhtTxFinishFuture​(GridCacheSharedContext<K,​V> cctx, GridDhtTxLocalAdapter tx, boolean commit)`

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `addDiagnosticRequest​(IgniteDiagnosticPrepareContext ctx)`
`void` `finish​(boolean commit)` Initializes future.
`IgniteUuid` `futureId()`
`void` `markNotTrackable()` Marks this future as non-trackable.
`boolean` `onDone​(IgniteInternalTx tx, Throwable err)` Callback to notify that future is finished.
`boolean` `onNodeLeft​(UUID nodeId)` Callback for when node left.
`void` `onResult​(UUID nodeId, GridDhtTxFinishResponse res)`
`void` `rollbackOnError​(Throwable e)`
`String` `toString()`
`boolean` `trackable()`
`GridDhtTxLocalAdapter` `tx()`

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

`duration, onDone, 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, logDebug, logError, markInitialized, processFailure`

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

`chain, chain, chain, chain, chainCompose, chainCompose, error, get, get, get, getUninterruptibly, ignoreInterrupts, isCancelled, isDone, isFailed, listen, listen, logger, onCancelled, 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.IgniteInternalFuture

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

### Constructor Detail

#### GridDhtTxFinishFuture

    public GridDhtTxFinishFuture​(GridCacheSharedContext<K,​V> cctx,
                                 GridDhtTxLocalAdapter tx,
                                 boolean commit)

Parameters:
  `cctx` - Context.
  `tx` - Transaction.
  `commit` - Commit flag.

### Method Detail

#### tx

    public GridDhtTxLocalAdapter tx()

Returns:
  Transaction.

#### futureId

    public IgniteUuid futureId()

Specified by:
  `futureId` in interface `GridCacheFuture<K>`
Returns:
  Unique identifier for this future.

#### onNodeLeft

    public boolean onNodeLeft​(UUID nodeId)

Callback for when node left.

Specified by:
  `onNodeLeft` in interface `GridCacheFuture<K>`
Parameters:
  `nodeId` - Left node ID.
Returns:
  `True` if future cared about this node.

#### trackable

    public boolean trackable()

Specified by:
  `trackable` in interface `GridCacheFuture<K>`
Returns:
  `True` if future should be tracked.

#### markNotTrackable

    public void markNotTrackable()

Marks this future as non-trackable.

Specified by:
  `markNotTrackable` in interface `GridCacheFuture<K>`

#### rollbackOnError

    public void rollbackOnError​(Throwable e)

Parameters:
  `e` - Error.

#### onResult

    public void onResult​(UUID nodeId,
                         GridDhtTxFinishResponse res)

Parameters:
  `nodeId` - Sender.
  `res` - Result.

#### onDone

    public boolean onDone​(IgniteInternalTx tx,
                          Throwable err)

Callback to notify that future is finished. Note that if non-`null` exception is passed in the result value will be ignored.

Overrides:
  `onDone` in class `GridFutureAdapter<IgniteInternalTx>`
Parameters:
  `tx` - Optional result.
  `err` - Optional error.
Returns:
  `True` if result was set by this call.

#### finish

    public void finish​(boolean commit)

Initializes future.

Parameters:
  `commit` - Commit flag.

#### addDiagnosticRequest

    public void addDiagnosticRequest​(IgniteDiagnosticPrepareContext ctx)

Specified by:
  `addDiagnosticRequest` in interface `IgniteDiagnosticAware`
Parameters:
  `ctx` - Context.

#### toString

    public String toString()

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