Package org.apache.cassandra.batchlog
Class BatchlogManager
- java.lang.Object
-
- org.apache.cassandra.batchlog.BatchlogManager
-
- All Implemented Interfaces:
BatchlogManagerMBean
public class BatchlogManager extends java.lang.Object implements BatchlogManagerMBean
-
-
Field Summary
Fields Modifier and Type Field Description static longBATCHLOG_REPLAY_TIMEOUTstatic BatchlogManagerinstancestatic java.lang.StringMBEAN_NAME
-
Constructor Summary
Constructors Constructor Description BatchlogManager()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intcountAllBatches()Counts all batches currently in the batchlog.voidforceBatchlogReplay()Forces batchlog replay.static longgetBatchlogTimeout()longgetTotalBatchesReplayed()static voidremove(TimeUUID id)voidsetRate(int throttleInKB)Sets the rate for the current rate limiter.voidshutdownAndWait(long timeout, java.util.concurrent.TimeUnit unit)voidstart()Future<?>startBatchlogReplay()static voidstore(Batch batch)static voidstore(Batch batch, boolean durableWrites)
-
-
-
Field Detail
-
MBEAN_NAME
public static final java.lang.String MBEAN_NAME
- See Also:
- Constant Field Values
-
instance
public static final BatchlogManager instance
-
BATCHLOG_REPLAY_TIMEOUT
public static final long BATCHLOG_REPLAY_TIMEOUT
-
-
Method Detail
-
start
public void start()
-
shutdownAndWait
public void shutdownAndWait(long timeout, java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedException, java.util.concurrent.TimeoutException- Throws:
java.lang.InterruptedExceptionjava.util.concurrent.TimeoutException
-
remove
public static void remove(TimeUUID id)
-
store
public static void store(Batch batch)
-
store
public static void store(Batch batch, boolean durableWrites)
-
countAllBatches
public int countAllBatches()
Description copied from interface:BatchlogManagerMBeanCounts all batches currently in the batchlog.- Specified by:
countAllBatchesin interfaceBatchlogManagerMBean- Returns:
- total batch count
-
getTotalBatchesReplayed
public long getTotalBatchesReplayed()
- Specified by:
getTotalBatchesReplayedin interfaceBatchlogManagerMBean- Returns:
- total count of batches replayed since node start
-
forceBatchlogReplay
public void forceBatchlogReplay() throws java.lang.ExceptionDescription copied from interface:BatchlogManagerMBeanForces batchlog replay. Blocks until completion.- Specified by:
forceBatchlogReplayin interfaceBatchlogManagerMBean- Throws:
java.lang.Exception
-
startBatchlogReplay
public Future<?> startBatchlogReplay()
-
setRate
public void setRate(int throttleInKB)
Sets the rate for the current rate limiter. WhenthrottleInKBis 0, this sets the rate toDouble.MAX_VALUEbytes per second.- Parameters:
throttleInKB- throughput to set in KiB per second
-
getBatchlogTimeout
public static long getBatchlogTimeout()
-
-