public class CommitLogSegmentManagerCDC extends AbstractCommitLogSegmentManager
commitLog| Constructor and Description |
|---|
CommitLogSegmentManagerCDC(CommitLog commitLog,
java.lang.String storageDirectory) |
| Modifier and Type | Method and Description |
|---|---|
CommitLogSegment.Allocation |
allocate(Mutation mutation,
int size)
Reserve space in the current segment for the provided mutation or, if there isn't space available,
create a new segment.
|
CommitLogSegment |
createSegment()
On segment creation, flag whether the segment should accept CDC mutations or not based on the total currently
allocated unflushed CDC segments and the contents of cdc_raw
|
void |
discard(CommitLogSegment segment,
boolean delete)
Indicates that a segment file has been flushed and is no longer needed.
|
void |
shutdown()
Initiates the shutdown process for the management thread.
|
long |
updateCDCTotalSize()
Only use for testing / validation that size tracker is working.
|
awaitTermination, getActiveSegments, onDiskSize, stopUnsafe, syncpublic CommitLogSegmentManagerCDC(CommitLog commitLog, java.lang.String storageDirectory)
public void discard(CommitLogSegment segment, boolean delete)
AbstractCommitLogSegmentManagersegment - segment to be discardeddelete - whether or not the segment is safe to be deleted.public void shutdown()
shutdown in class AbstractCommitLogSegmentManagerpublic CommitLogSegment.Allocation allocate(Mutation mutation, int size) throws WriteTimeoutException
allocate in class AbstractCommitLogSegmentManagermutation - Mutation to allocate in segment managersize - total size (overhead + serialized) of mutationWriteTimeoutException - If segment disallows CDC mutations, we throw WTEpublic CommitLogSegment createSegment()
public long updateCDCTotalSize()
Copyright © 2018 The Apache Software Foundation