org.apache.ignite.internal.util.nio

## Class GridNioRecoveryDescriptor

- java.lang.Object
- - org.apache.ignite.internal.util.nio.GridNioRecoveryDescriptor

    public class GridNioRecoveryDescriptor
    extends Object

Recovery information for single node.

### Constructor Summary

Constructors
Constructor and Description
`GridNioRecoveryDescriptor(int queueLimit, ClusterNode node, IgniteLogger log)`

### Method Summary

Methods
`void` `ackReceived(long rcvCnt)`
`boolean` `add(GridNioFuture<?> fut)`
`void` `connected()`
`long` `incrementConnectCount()`
`long` `lastAcknowledged()`
`void` `lastAcknowledged(long lastAck)`
`Deque<GridNioFuture<?>>` `messagesFutures()`
`ClusterNode` `node()`
`boolean` `nodeAlive(ClusterNode node)`
`void` `onHandshake(long rcvCnt)`
`void` `onNodeLeft()` Node left callback.
`long` `onReceived()` Increments received messages counter.
`int` `queueLimit()`
`long` `received()`
`long` `receivedCount()`
`void` `release()`
`boolean` `reserve()`
`String` `toString()`
`boolean` `tryReserve(long id, IgniteInClosure<Boolean> c)`

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

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

### Constructor Detail

#### GridNioRecoveryDescriptor

    public GridNioRecoveryDescriptor(int queueLimit,
                             ClusterNode node,
                             IgniteLogger log)

Parameters:
  `queueLimit` - Maximum size of unacknowledged messages queue.
  `node` - Node.
  `log` - Logger.

### Method Detail

#### incrementConnectCount

    public long incrementConnectCount()

Returns:
  Connect count.

#### node

    public ClusterNode node()

Returns:
  Node.

#### onReceived

    public long onReceived()

Increments received messages counter.

Returns:
  Number of received messages.

#### received

    public long received()

Returns:
  Number of received messages.

#### lastAcknowledged

    public void lastAcknowledged(long lastAck)

Parameters:
  `lastAck` - Last acknowledged message.

#### lastAcknowledged

    public long lastAcknowledged()

Returns:
  Last acknowledged message.

#### receivedCount

    public long receivedCount()

Returns:
  Received messages count.

#### queueLimit

    public int queueLimit()

Returns:
  Maximum size of unacknowledged messages queue.

#### add

    public boolean add(GridNioFuture<?> fut)

Parameters:
  `fut` - NIO future.
Returns:
  `False` if queue limit is exceeded.

#### ackReceived

    public void ackReceived(long rcvCnt)

Parameters:
  `rcvCnt` - Number of messages received by remote node.

#### onNodeLeft

    public void onNodeLeft()

Node left callback.

#### messagesFutures

    public Deque<GridNioFuture<?>> messagesFutures()

Returns:
  Message futures for unacknowledged messages.

#### nodeAlive

    public boolean nodeAlive(@Nullable
                    ClusterNode node)

Parameters:
  `node` - Node.
Returns:
  `True` if node is not null and has the same order as initial remtoe node.

#### reserve

    public boolean reserve()
                    throws InterruptedException

Returns:
  `True` if reserved.
Throws:
  `InterruptedException` - If interrupted.

#### onHandshake

    public void onHandshake(long rcvCnt)

Parameters:
  `rcvCnt` - Number of messages received by remote node.

#### connected

    public void connected()

#### release

    public void release()

#### tryReserve

    public boolean tryReserve(long id,
                     IgniteInClosure<Boolean> c)

Parameters:
  `id` - Handshake ID.
  `c` - Closure to run on reserve.
Returns:
  `True` if reserved.

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`

2015 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 1.0.0-RC3
Release Date | : March 24 2015