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.
|
awaitManagementTasksCompletion, awaitTermination, getActiveSegments, onDiskSize, shutdown, stopUnsafe, sync
public CommitLogSegmentManagerStandard(CommitLog commitLog, java.lang.String storageDirectory)
public void discard(CommitLogSegment segment, boolean delete)
AbstractCommitLogSegmentManager
segment
- 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 AbstractCommitLogSegmentManager
mutation
- mutation to allocate space forsize
- total size of mutation (overhead + serialized size)public CommitLogSegment createSegment()
AbstractCommitLogSegmentManager
Copyright © 2009-2021 The Apache Software Foundation