Class CommitLogSegmentManagerStandard

java.lang.Object
org.apache.cassandra.db.commitlog.AbstractCommitLogSegmentManager
org.apache.cassandra.db.commitlog.CommitLogSegmentManagerStandard

public class CommitLogSegmentManagerStandard extends AbstractCommitLogSegmentManager
  • Constructor Details

    • CommitLogSegmentManagerStandard

      public CommitLogSegmentManagerStandard(CommitLog commitLog, String storageDirectory)
  • Method Details

    • 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 class AbstractCommitLogSegmentManager
      Parameters:
      mutation - mutation to allocate space for
      size - 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 class AbstractCommitLogSegmentManager