public class EncryptedSegment extends FileDirectSegment
CommitLogDescriptor.writeHeader(ByteBuffer, CommitLogDescriptor)
)
- a series of 'sync segments' that are written every time the commit log is sync()'ed
-- a sync section header, see CommitLogSegment.writeSyncMarker(long, ByteBuffer, int, int, int)
-- total plain text length for this section
-- a series of encrypted data blocks, each of which contains:
--- the length of the encrypted block (cipher text)
--- the length of the unencrypted data (compressed text)
--- the encrypted block, which contains:
---- the length of the plain text (raw) data
---- block of compressed data
Notes:
- "length of the unencrypted data" is different from the length of resulting decrypted buffer as encryption adds padding
to the output buffer, and we need to ignore that padding when processing.CommitLogSegment.Allocation, CommitLogSegment.CDCState, CommitLogSegment.CommitLogSegmentFileComparator
descriptor, ENTRY_OVERHEAD_SIZE, id, manager
Constructor and Description |
---|
EncryptedSegment(CommitLog commitLog,
AbstractCommitLogSegmentManager manager) |
Modifier and Type | Method and Description |
---|---|
protected java.util.Map<java.lang.String,java.lang.String> |
additionalHeaderParameters()
Provide any additional header data that should be stored in the
CommitLogDescriptor . |
long |
onDiskSize() |
flush, internalClose
contains, contentSize, coverInMap, dirtyString, getCDCState, getCurrentCommitLogPosition, getDirtyCFIDs, getName, getPath, isStillAllocating, isUnused, markClean, setCDCState, toString, writeSyncMarker
public EncryptedSegment(CommitLog commitLog, AbstractCommitLogSegmentManager manager)
protected java.util.Map<java.lang.String,java.lang.String> additionalHeaderParameters()
CommitLogSegment
CommitLogDescriptor
.additionalHeaderParameters
in class CommitLogSegment
public long onDiskSize()
onDiskSize
in class CommitLogSegment
Copyright © 2009- The Apache Software Foundation