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 Modifier and Type Field Description static intHEADER_SZsizeOf(CRC) + sizeOf(Data size)
-
Constructor Summary
Constructors Constructor 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 Modifier and Type Method Description voidkeepBinary(boolean keepBinary)voidkernalContext(GridKernalContext cctx)voidraw(boolean raw)DumpEntryread(FileIO dumpFile, int grp, int part)ByteBufferwriteToBuffer(int cache, long expireTime, KeyCacheObject key, CacheObject val, GridCacheVersion ver, CacheObjectContext coCtx)
-
-
-
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. Ifnullthen encryption disabled.encSpi- Encryption SPI to use.
-
-
Method Detail
-
kernalContext
public void kernalContext(GridKernalContext cctx)
-
keepBinary
public void keepBinary(boolean keepBinary)
- Parameters:
keepBinary- Iftruethen return data in form ofBinaryObject.
-
raw
public void raw(boolean raw)
- Parameters:
raw- Iftruethen don't deserializeKeyCacheObjectandCacheObject.
-
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:
IOExceptionIgniteCheckedException
-
-