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

## Class GridCacheTxFinishSync<K,V>

- java.lang.Object
- - org.apache.ignite.internal.processors.cache.distributed.GridCacheTxFinishSync<K,V>

    public class GridCacheTxFinishSync<K,V>
    extends Object

Synchronization structure for asynchronous waiting for near tx finish responses based on per-node per-thread basis.

### Constructor Summary

Constructors
Constructor and Description
`GridCacheTxFinishSync(GridCacheSharedContext<K,V> cctx)`

### Method Summary

Methods
`IgniteInternalFuture<?>` `awaitAckAsync(UUID nodeId, long threadId)`
`void` `onAckReceived(UUID nodeId, long threadId)` Callback invoked when finish response is received from remote node.
`void` `onDisconnected(IgniteFuture<?> reconnectFut)`
`void` `onFinishSend(UUID nodeId, long threadId)` Callback invoked before finish request is sent to remote node.
`void` `onNodeLeft(UUID nodeId)` Callback invoked when node leaves grid.

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

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

### Constructor Detail

#### GridCacheTxFinishSync

    public GridCacheTxFinishSync(GridCacheSharedContext<K,V> cctx)

Parameters:
  `cctx` - Cache context.

### Method Detail

#### onFinishSend

    public void onFinishSend(UUID nodeId,
                    long threadId)

Callback invoked before finish request is sent to remote node.

Parameters:
  `nodeId` - Node ID request being sent to.
  `threadId` - Thread ID started transaction.

#### awaitAckAsync

    public IgniteInternalFuture<?> awaitAckAsync(UUID nodeId,
                                        long threadId)

Parameters:
  `nodeId` - Node ID to wait ack from.
  `threadId` - Thread ID to wait ack.
Returns:
  `null` if ack was received or future that will be completed when ack is received.

#### onDisconnected

    public void onDisconnected(IgniteFuture<?> reconnectFut)

Parameters:
  `reconnectFut` - Reconnect future.

#### onAckReceived

    public void onAckReceived(UUID nodeId,
                     long threadId)

Callback invoked when finish response is received from remote node.

Parameters:
  `nodeId` - Node ID response was received from.
  `threadId` - Thread ID started transaction.

#### onNodeLeft

    public void onNodeLeft(UUID nodeId)

Callback invoked when node leaves grid.

Parameters:
  `nodeId` - Left node ID.

2017 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 2.1.0
Release Date | : July 20 2017