org.apache.cassandra.db.commitlog
Class CommitLog
java.lang.Object
org.apache.cassandra.db.commitlog.CommitLog
- All Implemented Interfaces:
- CommitLogMBean
public class CommitLog
- extends java.lang.Object
- implements CommitLogMBean
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
instance
public static final CommitLog instance
resetUnsafe
public void resetUnsafe()
recover
public static int recover()
throws java.io.IOException
- Throws:
java.io.IOException
recover
public static int recover(java.io.File[] clogs)
throws java.io.IOException
- Throws:
java.io.IOException
getContext
public ReplayPosition getContext()
segmentsCount
public int segmentsCount()
add
public void add(RowMutation rowMutation)
throws java.io.IOException
- Throws:
java.io.IOException
discardCompletedSegments
public void discardCompletedSegments(java.lang.Integer cfId,
ReplayPosition context)
throws java.io.IOException
- Throws:
java.io.IOException
getSize
public long getSize()
- Returns:
- the total size occupied by the commitlog segments expressed in bytes.
getCompletedTasks
public long getCompletedTasks()
- Description copied from interface:
CommitLogMBean
- Get the number of completed tasks
- Specified by:
getCompletedTasks
in interface CommitLogMBean
getPendingTasks
public long getPendingTasks()
- Description copied from interface:
CommitLogMBean
- Get the number of tasks waiting to be executed
- Specified by:
getPendingTasks
in interface CommitLogMBean
getTotalCommitlogSize
public long getTotalCommitlogSize()
- Description copied from interface:
CommitLogMBean
- Get the current size used by all the commitlog segments.
- Specified by:
getTotalCommitlogSize
in interface CommitLogMBean
forceNewSegment
public void forceNewSegment()
throws java.util.concurrent.ExecutionException,
java.lang.InterruptedException
- Throws:
java.util.concurrent.ExecutionException
java.lang.InterruptedException
shutdownBlocking
public void shutdownBlocking()
throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
Copyright © 2011 The Apache Software Foundation