public class CommitLogSegmentManagerStandard extends AbstractCommitLogSegmentManager
commitLog| Constructor and Description |
|---|
CommitLogSegmentManagerStandard(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()
Hook to allow segment managers to track state surrounding creation of new segments.
|
void |
discard(CommitLogSegment segment,
boolean delete)
Indicates that a segment file has been flushed and is no longer needed.
|
awaitTermination, getActiveSegments, onDiskSize, shutdown, stopUnsafe, syncpublic CommitLogSegmentManagerStandard(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 CommitLogSegment.Allocation allocate(Mutation mutation, int size)
allocate in class AbstractCommitLogSegmentManagermutation - mutation to allocate space forsize - total size of mutation (overhead + serialized size)public CommitLogSegment createSegment()
AbstractCommitLogSegmentManagerCopyright © 2018 The Apache Software Foundation