Package org.apache.cassandra.batchlog
Class BatchlogManager
java.lang.Object
org.apache.cassandra.batchlog.BatchlogManager
- All Implemented Interfaces:
BatchlogManagerMBean
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final longstatic final BatchlogManagerstatic final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintCounts all batches currently in the batchlog.voidForces batchlog replay.static longlongstatic voidvoidsetRate(int throttleInKB) Sets the rate for the current rate limiter.voidshutdownAndWait(long timeout, TimeUnit unit) voidstart()Future<?>static voidstatic void
-
Field Details
-
MBEAN_NAME
- See Also:
-
instance
-
BATCHLOG_REPLAY_TIMEOUT
public static final long BATCHLOG_REPLAY_TIMEOUT
-
-
Constructor Details
-
BatchlogManager
public BatchlogManager()
-
-
Method Details
-
start
public void start() -
shutdownAndWait
public void shutdownAndWait(long timeout, TimeUnit unit) throws InterruptedException, TimeoutException - Throws:
InterruptedExceptionTimeoutException
-
remove
-
store
-
store
-
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
Description copied from interface:BatchlogManagerMBeanForces batchlog replay. Blocks until completion.- Specified by:
forceBatchlogReplayin interfaceBatchlogManagerMBean- Throws:
Exception
-
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()
-