public class CommitLogSegmentManager
extends java.lang.Object
Constructor and Description |
---|
CommitLogSegmentManager() |
Modifier and Type | Method and Description |
---|---|
org.apache.cassandra.db.commitlog.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.
|
void |
awaitTermination()
Returns when the management thread terminates.
|
long |
bytesUsed() |
void |
enableReserveSegmentCreation()
Throws a flag that enables the behavior of keeping at least one spare segment
available at all times.
|
boolean |
manages(java.lang.String name) |
void |
resetUnsafe()
Resets all the segments, for testing purposes.
|
void |
shutdown()
Initiates the shutdown process for the management thread.
|
public org.apache.cassandra.db.commitlog.CommitLogSegment.Allocation allocate(Mutation mutation, int size)
public long bytesUsed()
public boolean manages(java.lang.String name)
name
- the filename to checkpublic void enableReserveSegmentCreation()
public void resetUnsafe()
public void shutdown()
public void awaitTermination() throws java.lang.InterruptedException
java.lang.InterruptedException
Copyright © 2014 The Apache Software Foundation