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

## Class MvccSnapshotWithoutTxs

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

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

    public class MvccSnapshotWithoutTxs
    extends Object
    implements MvccSnapshot

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
`MvccSnapshotWithoutTxs()` Required by `GridIoMessageFactory`.
`MvccSnapshotWithoutTxs(long crdVer, long cntr, int opCntr, long cleanupVer)`

### Method Summary

All Methods Instance Methods Concrete Methods
`MvccLongList` `activeTransactions()`
`long` `cleanupVersion()`
`long` `coordinatorVersion()`
`long` `counter()`
`short` `directType()` Gets message type.
`byte` `fieldsCount()` Gets fields count.
`void` `incrementOperationCounter()` Increments operation counter.
`void` `onAckReceived()` Method called when ack message received.
`int` `operationCounter()`
`boolean` `readFrom(ByteBuffer buf, MessageReader reader)` Reads this message from provided byte buffer.
`String` `toString()`
`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

#### MvccSnapshotWithoutTxs

    public MvccSnapshotWithoutTxs()

Required by `GridIoMessageFactory`.

#### MvccSnapshotWithoutTxs

    public MvccSnapshotWithoutTxs(long crdVer,
                                  long cntr,
                                  int opCntr,
                                  long cleanupVer)

Parameters:
  `crdVer` - Coordinator version.
  `cntr` - Counter.
  `cleanupVer` - Cleanup version.

### Method Detail

#### activeTransactions

    public MvccLongList activeTransactions()

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

#### coordinatorVersion

    public long coordinatorVersion()

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

#### 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`

#### withoutActiveTransactions

    public MvccSnapshot withoutActiveTransactions()

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

#### 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`

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.12.0
Release Date | : January 10 2022