public class BatchlogManager extends java.lang.Object implements BatchlogManagerMBean
Modifier and Type | Field and Description |
---|---|
static long |
BATCHLOG_REPLAY_TIMEOUT |
static BatchlogManager |
instance |
static java.lang.String |
MBEAN_NAME |
Constructor and Description |
---|
BatchlogManager() |
Modifier and Type | Method and Description |
---|---|
int |
countAllBatches()
Counts all batches currently in the batchlog.
|
void |
forceBatchlogReplay()
Forces batchlog replay.
|
static long |
getBatchlogTimeout() |
long |
getTotalBatchesReplayed() |
static void |
remove(java.util.UUID id) |
void |
setRate(int throttleInKB)
Sets the rate for the current rate limiter.
|
void |
shutdownAndWait(long timeout,
java.util.concurrent.TimeUnit unit) |
void |
start() |
java.util.concurrent.Future<?> |
startBatchlogReplay() |
static void |
store(Batch batch) |
static void |
store(Batch batch,
boolean durableWrites) |
public static final java.lang.String MBEAN_NAME
public static final BatchlogManager instance
public static final long BATCHLOG_REPLAY_TIMEOUT
public void start()
public void shutdownAndWait(long timeout, java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedException, java.util.concurrent.TimeoutException
java.lang.InterruptedException
java.util.concurrent.TimeoutException
public static void remove(java.util.UUID id)
public static void store(Batch batch)
public static void store(Batch batch, boolean durableWrites)
public int countAllBatches()
BatchlogManagerMBean
countAllBatches
in interface BatchlogManagerMBean
public long getTotalBatchesReplayed()
getTotalBatchesReplayed
in interface BatchlogManagerMBean
public void forceBatchlogReplay() throws java.lang.Exception
BatchlogManagerMBean
forceBatchlogReplay
in interface BatchlogManagerMBean
java.lang.Exception
public java.util.concurrent.Future<?> startBatchlogReplay()
public void setRate(int throttleInKB)
throttleInKB
is 0, this sets the rate to
Double.MAX_VALUE
bytes per second.throttleInKB
- throughput to set in KB per secondpublic static long getBatchlogTimeout()
Copyright © 2009-2022 The Apache Software Foundation