org.apache.ignite.internal.processors.cache.persistence.wal.serializer

## Class TxRecordSerializer

- java.lang.Object
- - org.apache.ignite.internal.processors.cache.persistence.wal.serializer.TxRecordSerializer

    public class TxRecordSerializer
    extends Object

`TxRecord` WAL serializer.

### Constructor Summary

Constructors
Constructor and Description
`TxRecordSerializer()`

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `putMvccVersion(ByteBuffer buf, MvccVersion mvccVer)` Writes `MvccVersion` to given buffer.
`MvccTxRecord` `readMvccTx(ByteBufferBackedDataInput in)` Reads `MvccTxRecord` from given input.
`MvccVersion` `readMvccVersion(ByteBufferBackedDataInput in)` Reads `MvccVersion` from given input.
`TxRecord` `readTx(ByteBufferBackedDataInput in)` Reads `TxRecord` from given input.
`int` `size(MvccTxRecord rec)` Returns size of marshalled `TxRecord` in bytes.
`int` `size(TxRecord rec)` Returns size of marshalled `TxRecord` in bytes.
`void` `write(MvccTxRecord rec, ByteBuffer buf)` Writes `MvccTxRecord` to given buffer.
`void` `write(TxRecord rec, ByteBuffer buf)` Writes `TxRecord` to given buffer.

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

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

### Constructor Detail

#### TxRecordSerializer

    public TxRecordSerializer()

### Method Detail

#### readMvccVersion

    public MvccVersion readMvccVersion(ByteBufferBackedDataInput in)
                                throws IOException

Reads `MvccVersion` from given input.

Parameters:
  `in` - Data input to read from.
Returns:
  Mvcc version.
Throws:
  `IOException`

#### putMvccVersion

    public void putMvccVersion(ByteBuffer buf,
                               MvccVersion mvccVer)

Writes `MvccVersion` to given buffer.

Parameters:
  `buf` - Buffer to write.
  `mvccVer` - Mvcc version.

#### write

    public void write(TxRecord rec,
                      ByteBuffer buf)

Writes `TxRecord` to given buffer.

Parameters:
  `rec` - TxRecord.
  `buf` - Byte buffer.

#### readTx

    public TxRecord readTx(ByteBufferBackedDataInput in)
                    throws IOException

Reads `TxRecord` from given input.

Parameters:
  `in` - Input
Returns:
  TxRecord.
Throws:
  `IOException` - In case of fail.

#### size

    public int size(TxRecord rec)

Returns size of marshalled `TxRecord` in bytes.

Parameters:
  `rec` - TxRecord.
Returns:
  Size of TxRecord in bytes.

#### readMvccTx

    public MvccTxRecord readMvccTx(ByteBufferBackedDataInput in)
                            throws IOException

Reads `MvccTxRecord` from given input.

Parameters:
  `in` - Input
Returns:
  MvccTxRecord.
Throws:
  `IOException` - In case of fail.

#### write

    public void write(MvccTxRecord rec,
                      ByteBuffer buf)
               throws IgniteCheckedException

Writes `MvccTxRecord` to given buffer.

Parameters:
  `rec` - MvccTxRecord.
  `buf` - Byte buffer.
Throws:
  `IgniteCheckedException` - In case of fail.

#### size

    public int size(MvccTxRecord rec)
             throws IgniteCheckedException

Returns size of marshalled `TxRecord` in bytes.

Parameters:
  `rec` - TxRecord.
Returns:
  Size of TxRecord in bytes.
Throws:
  `IgniteCheckedException` - In case of fail.

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.11.1
Release Date | : December 20 2021