Package nosql.batch.update.wal
Class AbstractWriteAheadLogCompleter<LOCKS,UPDATES,BATCH_ID>
java.lang.Object
nosql.batch.update.wal.AbstractWriteAheadLogCompleter<LOCKS,UPDATES,BATCH_ID>
- Direct Known Subclasses:
WriteAheadLogCompleter
Completes hanged transactions
-
Constructor Summary
ConstructorsConstructorDescriptionAbstractWriteAheadLogCompleter(Duration staleBatchesThreshold, int batchSize, ExclusiveLocker exclusiveLocker, ScheduledExecutorService scheduledExecutorService) -
Method Summary
Modifier and TypeMethodDescriptiongetStaleBatchesForRange(WalTimeRange timeRange) protected abstract List<WalTimeRange>getTimeRanges(Duration staleBatchesThreshold, int batchSize) booleanprotected abstract voidprotected abstract voidvoidresume()You should call it when the data center had been switched into the active modevoidshutdown()voidstart()voidsuspend()You should call it when the data center had been switched into the passive mode
-
Constructor Details
-
AbstractWriteAheadLogCompleter
public AbstractWriteAheadLogCompleter(Duration staleBatchesThreshold, int batchSize, ExclusiveLocker exclusiveLocker, ScheduledExecutorService scheduledExecutorService) - Parameters:
staleBatchesThreshold-batchSize-exclusiveLocker-scheduledExecutorService-
-
-
Method Details
-
start
public void start() -
shutdown
public void shutdown() -
suspend
public void suspend()You should call it when the data center had been switched into the passive mode -
isSuspended
public boolean isSuspended() -
resume
public void resume()You should call it when the data center had been switched into the active mode -
completeHangedTransactions
-
releaseLocksAndDeleteWalTransactionOnError
-
processAndDeleteTransactions
-
getTimeRanges
-
getStaleBatchesForRange
-