org.apache.ignite.internal.processors.cache.persistence.snapshot.dump

## Class DumpEntrySerializer

- java.lang.Object
- - org.apache.ignite.internal.processors.cache.persistence.snapshot.dump.DumpEntrySerializer

    public class DumpEntrySerializer
    extends Object

Serialization logic for dump.

### Field Summary

Fields
`static int` `HEADER_SZ` sizeOf(CRC) + sizeOf(Data size)

### Constructor Summary

Constructors
Constructor and Description
`DumpEntrySerializer(ConcurrentMap<Long,ByteBuffer> thLocBufs, @Nullable ConcurrentMap<Long,ByteBuffer> encThLocBufs, @Nullable Serializable encKey, @Nullable EncryptionSpi encSpi)`

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `keepBinary(boolean keepBinary)`
`void` `kernalContext(GridKernalContext cctx)`
`void` `raw(boolean raw)`
`DumpEntry` `read(FileIO dumpFile, int grp, int part)`
`ByteBuffer` `writeToBuffer(int cache, long expireTime, KeyCacheObject key, CacheObject val, GridCacheVersion ver, CacheObjectContext coCtx)`

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

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

### Field Detail

#### HEADER_SZ

    public static final int HEADER_SZ

sizeOf(CRC) + sizeOf(Data size)

See Also:
  Constant Field Values

### Constructor Detail

#### DumpEntrySerializer

    public DumpEntrySerializer(ConcurrentMap<Long,ByteBuffer> thLocBufs,
                               @Nullable
                               @Nullable ConcurrentMap<Long,ByteBuffer> encThLocBufs,
                               @Nullable
                               @Nullable Serializable encKey,
                               @Nullable
                               @Nullable EncryptionSpi encSpi)

Parameters:
  `thLocBufs` - Thread local buffers.
  `encKey` - Encrytpion key. If `null` then encryption disabled.
  `encSpi` - Encryption SPI to use.

### Method Detail

#### kernalContext

    public void kernalContext(GridKernalContext cctx)

#### keepBinary

    public void keepBinary(boolean keepBinary)

Parameters:
  `keepBinary` - If `true` then return data in form of `BinaryObject`.

#### raw

    public void raw(boolean raw)

Parameters:
  `raw` - If `true` then don't deserialize `KeyCacheObject` and `CacheObject`.

#### writeToBuffer

    public ByteBuffer writeToBuffer(int cache,
                                    long expireTime,
                                    KeyCacheObject key,
                                    CacheObject val,
                                    GridCacheVersion ver,
                                    CacheObjectContext coCtx)
                             throws IgniteCheckedException

Parameters:
  `cache` - Cache id.
  `expireTime` - Expire time.
  `key` - Key.
  `val` - Value.
  `coCtx` - Cache object context.
Returns:
  Buffer with serialized entry.
Throws:
  `IgniteCheckedException` - If failed.

#### read

    public DumpEntry read(FileIO dumpFile,
                          int grp,
                          int part)
                   throws IOException,
                          IgniteCheckedException

Parameters:
  `dumpFile` - File to read data from.
  `grp` - Cache group.
Returns:
  dump entry.
Throws:
  `IOException`
  `IgniteCheckedException`

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.16.0
Release Date | : December 15 2023