public class RecordDataV1Serializer extends Object implements RecordDataSerializer
| Modifier and Type | Class and Description |
|---|---|
static class |
RecordDataV1Serializer.EncryptedDataEntry
Represents encrypted Data Entry (
DataEntry.key, value) pair. |
| Modifier and Type | Field and Description |
|---|---|
protected GridCacheSharedContext |
cctx
Cache shared context.
|
protected IgniteCacheObjectProcessor |
co
Cache object processor to reading
DataEntries. |
protected int |
pageSize
Size of page used for PageMemory regions.
|
protected int |
realPageSize
Size of page without encryption overhead.
|
| Constructor and Description |
|---|
RecordDataV1Serializer(GridCacheSharedContext cctx) |
| Modifier and Type | Method and Description |
|---|---|
GridCacheSharedContext |
cctx()
Return shared cache context.
|
protected int |
dataSize(DataRecord dataRec) |
protected int |
entrySize(DataEntry entry) |
WALRecord |
readRecord(WALRecord.RecordType type,
ByteBufferBackedDataInput in,
int size)
Reads record data of
type from buffer in. |
int |
size(WALRecord record)
Calculates size of record data.
|
void |
writeRecord(WALRecord rec,
ByteBuffer buf)
Writes record data to buffer
buf. |
protected final GridCacheSharedContext cctx
protected final int pageSize
protected final int realPageSize
protected final IgniteCacheObjectProcessor co
DataEntries.public RecordDataV1Serializer(GridCacheSharedContext cctx)
cctx - Cache shared context.public int size(WALRecord record) throws IgniteCheckedException
size in interface RecordDataSerializerrecord - WAL record.IgniteCheckedException - If it's unable to calculate record data size.public WALRecord readRecord(WALRecord.RecordType type, ByteBufferBackedDataInput in, int size) throws IOException, IgniteCheckedException
type from buffer in.readRecord in interface RecordDataSerializertype - Record type.in - Buffer to read.size - Record size (0 if unknown).IOException - In case of I/O problems.IgniteCheckedException - If it's unable to read record.public void writeRecord(WALRecord rec, ByteBuffer buf) throws IgniteCheckedException
buf.writeRecord in interface RecordDataSerializerrec - WAL record.buf - Buffer to write.IgniteCheckedException - If it's unable to write record.public GridCacheSharedContext cctx()
protected int dataSize(DataRecord dataRec) throws IgniteCheckedException
dataRec - Data record to serialize.IgniteCheckedException - If failed to obtain the length of one of the entries.protected int entrySize(DataEntry entry) throws IgniteCheckedException
entry - Entry to get size for.IgniteCheckedException - If failed to get key or value bytes length.
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.10.0 Release Date : March 10 2021