org.apache.ignite.internal.util.nio

## Class GridNioFutureImpl<R>

- 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.nio.GridNioFutureImpl<R>

All Implemented Interfaces:
  Serializable, IgniteInternalFuture<R>, GridNioFuture<R>

Direct Known Subclasses:
  GridNioEmbeddedFuture

    public class GridNioFutureImpl<R>
    extends GridFutureAdapter<R>
    implements GridNioFuture<R>

Default future implementation.

See Also:
  Serialized Form

### Nested Class Summary

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

`AbstractQueuedSynchronizer.ConditionObject`

### Field Summary

Fields
`protected IgniteInClosure<IgniteException>` `ackClosure`
`protected boolean` `msgThread`

### Constructor Summary

Constructors
Constructor and Description
`GridNioFutureImpl()`

### Method Summary

Methods
`IgniteInClosure<IgniteException>` `ackClosure()`
`void` `ackClosure(IgniteInClosure<IgniteException> closure)` Sets ack closure which will be applied when ack received.
`boolean` `messageThread()`
`void` `messageThread(boolean msgThread)` Sets flag indicating that message send future was created in thread that was processing a message.
`void` `onAckReceived()` The method will be called when ack received.
`boolean` `skipRecovery()`
`String` `toString()`

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

`cancel, chain, duration, endTime, error, get, get, get, get0, getUninterruptibly, ignoreInterrupts, isCancelled, isDone, isFailed, listen, logger, onCancelled, onDone, 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`

### Field Detail

#### msgThread

    protected boolean msgThread

#### ackClosure

    protected IgniteInClosure<IgniteException> ackClosure

### Constructor Detail

#### GridNioFutureImpl

    public GridNioFutureImpl()

### Method Detail

#### messageThread

    public void messageThread(boolean msgThread)

Sets flag indicating that message send future was created in thread that was processing a message.

Specified by:
  `messageThread` in interface `GridNioFuture<R>`
Parameters:
  `msgThread` - `True` if future was created in thread that is processing message.

#### messageThread

    public boolean messageThread()

Specified by:
  `messageThread` in interface `GridNioFuture<R>`
Returns:
  `True` if future was created in thread that was processing message.

#### skipRecovery

    public boolean skipRecovery()

Specified by:
  `skipRecovery` in interface `GridNioFuture<R>`
Returns:
  `True` if skip recovery for this operation.

#### ackClosure

    public void ackClosure(IgniteInClosure<IgniteException> closure)

Sets ack closure which will be applied when ack received.

Specified by:
  `ackClosure` in interface `GridNioFuture<R>`
Parameters:
  `closure` - Ack closure.

#### onAckReceived

    public void onAckReceived()

The method will be called when ack received.

Specified by:
  `onAckReceived` in interface `GridNioFuture<R>`

#### ackClosure

    public IgniteInClosure<IgniteException> ackClosure()

Specified by:
  `ackClosure` in interface `GridNioFuture<R>`
Returns:
  Ack closure.

#### toString

    public String toString()

Overrides:
  `toString` in class `GridFutureAdapter<R>`

2015 Copyright © Apache Software Foundation

Follow @ApacheIgnite

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