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

## Class GridDhtTxFinishFuture<K,V>

- java.lang.Object
- - java.util.concurrent.locks.AbstractOwnableSynchronizer
  - - java.util.concurrent.locks.AbstractQueuedSynchronizer
    - - org.apache.ignite.internal.util.future.GridFutureAdapter<R>
      - - org.apache.ignite.internal.util.future.GridCompoundFuture<T,T>
        - - org.apache.ignite.internal.util.future.GridCompoundIdentityFuture<IgniteInternalTx>
          - - org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtTxFinishFuture<K,V>

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

    public final class GridDhtTxFinishFuture<K,V>
    extends GridCompoundIdentityFuture<IgniteInternalTx>
    implements GridCacheFuture<IgniteInternalTx>

See Also:
  Serialized Form

### Nested Class Summary

### Nested classes/interfaces inherited from class java.util.concurrent.locks.AbstractQueuedSynchronizer

`AbstractQueuedSynchronizer.ConditionObject`

### Field Summary

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

`sync`

### Constructor Summary

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

### Method Summary

Methods
`void` `finish()` 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.
`void` `onError(Throwable e)`
`boolean` `onNodeLeft(UUID nodeId)` Callback for when node left.
`void` `onResult(UUID nodeId, GridDhtTxFinishResponse res)`
`String` `toString()`
`boolean` `trackable()`
`GridDhtTxLocalAdapter` `tx()`

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

`add, apply, cancel, clear, future, futures, futuresCount, hasPending, ignoreFailure, initialized, markInitialized`

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

`chain, duration, endTime, error, get, get, get, get0, getUninterruptibly, ignoreInterrupts, isCancelled, isDone, isFailed, listen, logger, onCancelled, onDone, onDone, onDone, result, startTime, tryAcquireShared, tryReleaseShared`

### Methods inherited from class java.util.concurrent.locks.AbstractQueuedSynchronizer

`acquire, 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, tryRelease`

### Methods inherited from class java.util.concurrent.locks.AbstractOwnableSynchronizer

`getExclusiveOwnerThread, setExclusiveOwnerThread`

### 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, duration, error, get, get, get, getUninterruptibly, isCancelled, isDone, listen, result, startTime`

### 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<IgniteInternalTx>`
Returns:
  Unique identifier for this future.

#### onNodeLeft

    public boolean onNodeLeft(UUID nodeId)

Callback for when node left.

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

#### trackable

    public boolean trackable()

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

#### markNotTrackable

    public void markNotTrackable()

Marks this future as non-trackable.

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

#### onError

    public void onError(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()

Initializes future.

#### toString

    public String toString()

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

2015 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 1.8.0
Release Date | : December 5 2016