org.apache.ignite.internal.processors.cache.mvcc.msg

## Class MvccSnapshotResponse

- java.lang.Object
- - org.apache.ignite.internal.processors.cache.mvcc.msg.MvccSnapshotResponse

All Implemented Interfaces:
  Serializable, Comparable<MvccVersion>, MvccMessage, MvccLongList, MvccSnapshot, MvccVersion, Message

    public class MvccSnapshotResponse
    extends Object
    implements MvccMessage, MvccSnapshot, MvccLongList

See Also:
  Serialized Form

### Field Summary

### Fields inherited from interface org.apache.ignite.plugin.extensions.communication.Message

`DIRECT_TYPE_SIZE`

### Constructor Summary

Constructors
Constructor and Description
`MvccSnapshotResponse()` Required by `GridIoMessageFactory`.

### Method Summary

All Methods Instance Methods Concrete Methods
`MvccLongList` `activeTransactions()`
`void` `addTx(long txId)`
`long` `cleanupVersion()`
`boolean` `contains(long val)`
`long` `coordinatorVersion()`
`long` `counter()`
`short` `directType()` Gets message type.
`byte` `fieldsCount()` Gets fields count.
`long` `futureId()`
`long` `get(int i)`
`void` `incrementOperationCounter()` Increments operation counter.
`void` `init(long futId, long crdVer, long cntr, int opCntr, long cleanupVer, long tracking)`
`void` `onAckReceived()` Method called when ack message received.
`int` `operationCounter()`
`boolean` `processedFromNioThread()`
`boolean` `readFrom(ByteBuffer buf, MessageReader reader)` Reads this message from provided byte buffer.
`int` `size()`
`String` `toString()`
`long` `tracking()`
`boolean` `waitForCoordinatorInit()`
`MvccSnapshot` `withoutActiveTransactions()`
`boolean` `writeTo(ByteBuffer buf, MessageWriter writer)` Writes this message to provided byte buffer.

### 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.processors.cache.mvcc.MvccVersion

`compareTo`

### Constructor Detail

#### MvccSnapshotResponse

    public MvccSnapshotResponse()

Required by `GridIoMessageFactory`.

### Method Detail

#### init

    public void init(long futId,
                     long crdVer,
                     long cntr,
                     int opCntr,
                     long cleanupVer,
                     long tracking)

Parameters:
  `futId` - Future ID.
  `crdVer` - Coordinator version.
  `cntr` - Counter.
  `opCntr` - Operation counter.
  `cleanupVer` - Cleanup version.
  `tracking` - Tracking number.

#### addTx

    public void addTx(long txId)

Parameters:
  `txId` - Transaction counter.

#### size

    public int size()

Specified by:
  `size` in interface `MvccLongList`

#### get

    public long get(int i)

Specified by:
  `get` in interface `MvccLongList`

#### contains

    public boolean contains(long val)

Specified by:
  `contains` in interface `MvccLongList`

#### tracking

    public long tracking()

Returns:
  Tracking counter.

#### waitForCoordinatorInit

    public boolean waitForCoordinatorInit()

Specified by:
  `waitForCoordinatorInit` in interface `MvccMessage`
Returns:
  `True` if should wait for coordinator initialization.

#### processedFromNioThread

    public boolean processedFromNioThread()

Specified by:
  `processedFromNioThread` in interface `MvccMessage`
Returns:
  `True` if message should be processed from NIO thread.

#### futureId

    public long futureId()

Returns:
  Future ID.

#### cleanupVersion

    public long cleanupVersion()

Specified by:
  `cleanupVersion` in interface `MvccSnapshot`
Returns:
  Cleanup version (all smaller versions are safe to remove).

#### counter

    public long counter()

Specified by:
  `counter` in interface `MvccVersion`
Returns:
  Local counter.

#### operationCounter

    public int operationCounter()

Specified by:
  `operationCounter` in interface `MvccVersion`
Returns:
  Operation id in scope of current transaction.

#### incrementOperationCounter

    public void incrementOperationCounter()

Increments operation counter.

Specified by:
  `incrementOperationCounter` in interface `MvccSnapshot`

#### activeTransactions

    public MvccLongList activeTransactions()

Specified by:
  `activeTransactions` in interface `MvccSnapshot`
Returns:
  Active transactions.

#### withoutActiveTransactions

    public MvccSnapshot withoutActiveTransactions()

Specified by:
  `withoutActiveTransactions` in interface `MvccSnapshot`
Returns:
  Version without active transactions.

#### coordinatorVersion

    public long coordinatorVersion()

Specified by:
  `coordinatorVersion` in interface `MvccVersion`
Returns:
  Coordinator version.

#### writeTo

    public boolean writeTo(ByteBuffer buf,
                           MessageWriter writer)

Writes this message to provided byte buffer.

Specified by:
  `writeTo` in interface `Message`
Parameters:
  `buf` - Byte buffer.
  `writer` - Writer.
Returns:
  Whether message was fully written.

#### readFrom

    public boolean readFrom(ByteBuffer buf,
                            MessageReader reader)

Reads this message from provided byte buffer.

Specified by:
  `readFrom` in interface `Message`
Parameters:
  `buf` - Byte buffer.
  `reader` - Reader.
Returns:
  Whether message was fully read.

#### directType

    public short directType()

Gets message type.

Specified by:
  `directType` in interface `Message`
Returns:
  Message type.

#### fieldsCount

    public byte fieldsCount()

Gets fields count.

Specified by:
  `fieldsCount` in interface `Message`
Returns:
  Fields count.

#### onAckReceived

    public void onAckReceived()

Method called when ack message received.

Specified by:
  `onAckReceived` in interface `Message`

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`

2018 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.7.5
Release Date | : June 4 2019