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 long
BATCHLOG_REPLAY_TIMEOUT
static BatchlogManager
instance
static java.lang.String
MBEAN_NAME
-
Constructor Summary
Constructors Constructor Description BatchlogManager()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
countAllBatches()
Counts all batches currently in the batchlog.void
forceBatchlogReplay()
Forces batchlog replay.static long
getBatchlogTimeout()
long
getTotalBatchesReplayed()
static void
remove(TimeUUID id)
void
setRate(int throttleInKB)
Sets the rate for the current rate limiter.void
shutdownAndWait(long timeout, java.util.concurrent.TimeUnit unit)
void
start()
Future<?>
startBatchlogReplay()
static void
store(Batch batch)
static void
store(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.InterruptedException
java.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:BatchlogManagerMBean
Counts all batches currently in the batchlog.- Specified by:
countAllBatches
in interfaceBatchlogManagerMBean
- Returns:
- total batch count
-
getTotalBatchesReplayed
public long getTotalBatchesReplayed()
- Specified by:
getTotalBatchesReplayed
in interfaceBatchlogManagerMBean
- Returns:
- total count of batches replayed since node start
-
forceBatchlogReplay
public void forceBatchlogReplay() throws java.lang.Exception
Description copied from interface:BatchlogManagerMBean
Forces batchlog replay. Blocks until completion.- Specified by:
forceBatchlogReplay
in interfaceBatchlogManagerMBean
- Throws:
java.lang.Exception
-
startBatchlogReplay
public Future<?> startBatchlogReplay()
-
setRate
public void setRate(int throttleInKB)
Sets the rate for the current rate limiter. WhenthrottleInKB
is 0, this sets the rate toDouble.MAX_VALUE
bytes per second.- Parameters:
throttleInKB
- throughput to set in KiB per second
-
getBatchlogTimeout
public static long getBatchlogTimeout()
-
-