public abstract class AbstractCommitLogSegmentManager
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected CommitLogSegment |
allocatingFrom
The segment we are currently allocating commit log records to
|
protected CommitLog |
commitLog |
protected boolean |
run |
Modifier and Type | Method and Description |
---|---|
protected void |
advanceAllocatingFrom(CommitLogSegment old)
Fetches a new segment from the queue, signaling the management thread to create a new one if necessary, and "activates" it.
|
abstract CommitLogSegment.Allocation |
allocate(Mutation mutation,
int size)
Allocate a segment within this CLSM.
|
void |
awaitTermination()
Returns when the management thread terminates.
|
java.util.Collection<CommitLogSegment> |
getActiveSegments() |
boolean |
manages(java.lang.String name) |
long |
onDiskSize() |
abstract void |
shutdown()
Shut down the CLSM.
|
void |
stopUnsafe(boolean deleteSegments)
Stops CL, for testing purposes.
|
void |
sync(boolean syncAllSegments)
Forces a disk flush on the commit log files that need it.
|
protected void |
wakeManager() |
protected volatile CommitLogSegment allocatingFrom
protected volatile boolean run
protected final CommitLog commitLog
public abstract void shutdown()
public abstract CommitLogSegment.Allocation allocate(Mutation mutation, int size)
protected void advanceAllocatingFrom(CommitLogSegment old)
protected void wakeManager()
public long onDiskSize()
public boolean manages(java.lang.String name)
name
- the filename to checkpublic void stopUnsafe(boolean deleteSegments)
public void awaitTermination() throws java.lang.InterruptedException
java.lang.InterruptedException
public java.util.Collection<CommitLogSegment> getActiveSegments()
public void sync(boolean syncAllSegments) throws java.io.IOException
java.io.IOException
Copyright © 2016 The Apache Software Foundation