Class AbstractWriteAheadLogCompleter<LOCKS,UPDATES,BATCH_ID>

java.lang.Object
nosql.batch.update.wal.AbstractWriteAheadLogCompleter<LOCKS,UPDATES,BATCH_ID>
Direct Known Subclasses:
WriteAheadLogCompleter

public abstract class AbstractWriteAheadLogCompleter<LOCKS,UPDATES,BATCH_ID> extends Object
Completes hanged transactions
  • 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

      public CompletionStatistic completeHangedTransactions()
    • releaseLocksAndDeleteWalTransactionOnError

      protected abstract void releaseLocksAndDeleteWalTransactionOnError(WalRecord<LOCKS,UPDATES,BATCH_ID> batch)
    • processAndDeleteTransactions

      protected abstract void processAndDeleteTransactions(WalRecord<LOCKS,UPDATES,BATCH_ID> batch)
    • getTimeRanges

      protected abstract List<WalTimeRange> getTimeRanges(Duration staleBatchesThreshold, int batchSize)
    • getStaleBatchesForRange

      protected abstract List<WalRecord<LOCKS,UPDATES,BATCH_ID>> getStaleBatchesForRange(WalTimeRange timeRange)