|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.cassandra.db.commitlog.CommitLog
public class CommitLog
| Field Summary | |
|---|---|
CommitLogSegment |
activeSegment
|
CommitLogAllocator |
allocator
|
CommitLogArchiver |
archiver
|
static int |
END_OF_SEGMENT_MARKER
|
static int |
END_OF_SEGMENT_MARKER_SIZE
|
static CommitLog |
instance
|
| Method Summary | |
|---|---|
int |
activeSegments()
Used by tests. |
void |
add(RowMutation rm)
Add a RowMutation to the commit log. |
void |
discardCompletedSegments(java.util.UUID cfId,
ReplayPosition context)
Modifies the per-CF dirty cursors of any commit log segments for the column family according to the position given. |
void |
forceNewSegment()
Forces a new segment file to be allocated and activated. |
java.util.List<java.lang.String> |
getActiveSegmentNames()
|
java.util.List<java.lang.String> |
getArchivingSegmentNames()
|
long |
getCompletedTasks()
Get the number of completed tasks |
java.util.concurrent.Future<ReplayPosition> |
getContext()
|
long |
getPendingTasks()
Get the number of tasks waiting to be executed |
long |
getTotalCommitlogSize()
Get the current size used by all the commitlog segments. |
int |
recover()
Perform recovery on commit logs located in the directory specified by the config file. |
int |
recover(java.io.File... clogs)
Perform recovery on a list of commit log files. |
void |
recover(java.lang.String path)
Perform recovery on a single commit log. |
void |
resetUnsafe()
FOR TESTING PURPOSES. |
void |
shutdownBlocking()
Shuts down the threads used by the commit log, blocking until completion. |
void |
sync()
Forces a disk flush on the commit log files that need it. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final CommitLog instance
public final CommitLogAllocator allocator
public final CommitLogArchiver archiver
public static final int END_OF_SEGMENT_MARKER
public static final int END_OF_SEGMENT_MARKER_SIZE
public CommitLogSegment activeSegment
| Method Detail |
|---|
public void resetUnsafe()
public int recover()
throws java.io.IOException
java.io.IOException
public int recover(java.io.File... clogs)
throws java.io.IOException
clogs - the list of commit log files to replay
java.io.IOException
public void recover(java.lang.String path)
throws java.io.IOException
recover in interface CommitLogMBeanjava.io.IOExceptionpublic java.util.concurrent.Future<ReplayPosition> getContext()
public int activeSegments()
public void add(RowMutation rm)
rm - the RowMutation to add to the log
public void discardCompletedSegments(java.util.UUID cfId,
ReplayPosition context)
cfId - the column family ID that was flushedcontext - the replay position of the flushpublic void sync()
public long getCompletedTasks()
CommitLogMBean
getCompletedTasks in interface CommitLogMBeanCommitLogMetrics.completedTaskspublic long getPendingTasks()
CommitLogMBean
getPendingTasks in interface CommitLogMBeanCommitLogMetrics.pendingTaskspublic long getTotalCommitlogSize()
CommitLogMBean
getTotalCommitlogSize in interface CommitLogMBeanCommitLogMetrics.totalCommitLogSize
public void forceNewSegment()
throws java.util.concurrent.ExecutionException,
java.lang.InterruptedException
java.util.concurrent.ExecutionException
java.lang.InterruptedExceptionpublic java.util.List<java.lang.String> getActiveSegmentNames()
getActiveSegmentNames in interface CommitLogMBeanpublic java.util.List<java.lang.String> getArchivingSegmentNames()
getArchivingSegmentNames in interface CommitLogMBean
public void shutdownBlocking()
throws java.lang.InterruptedException
java.lang.InterruptedException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||