Class CommitLogSegmentManagerStandard
- java.lang.Object
-
- org.apache.cassandra.db.commitlog.AbstractCommitLogSegmentManager
-
- org.apache.cassandra.db.commitlog.CommitLogSegmentManagerStandard
-
public class CommitLogSegmentManagerStandard extends AbstractCommitLogSegmentManager
-
-
Constructor Summary
Constructors Constructor Description CommitLogSegmentManagerStandard(CommitLog commitLog, java.lang.String storageDirectory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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)
-
Methods inherited from class org.apache.cassandra.db.commitlog.AbstractCommitLogSegmentManager
awaitManagementTasksCompletion, awaitTermination, getActiveSegments, onDiskSize, shutdown, stopUnsafe, sync
-
-
-
-
Constructor Detail
-
CommitLogSegmentManagerStandard
public CommitLogSegmentManagerStandard(CommitLog commitLog, java.lang.String storageDirectory)
-
-
Method Detail
-
discard
public void discard(CommitLogSegment segment, boolean delete)
-
allocate
public 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. allocate() is blocking until allocation succeeds as it waits on a signal in advanceAllocatingFrom- Specified by:
allocate
in classAbstractCommitLogSegmentManager
- Parameters:
mutation
- mutation to allocate space forsize
- total size of mutation (overhead + serialized size)- Returns:
- the provided Allocation object
-
createSegment
public CommitLogSegment createSegment()
Description copied from class:AbstractCommitLogSegmentManager
Hook to allow segment managers to track state surrounding creation of new segments. Onl perform as task submit to segment manager so it's performed on segment management thread.- Overrides:
createSegment
in classAbstractCommitLogSegmentManager
-
-