Interface TransactionTimeoutTracker

  • All Superinterfaces:
    java.lang.AutoCloseable

    @Beta
    public interface TransactionTimeoutTracker
    extends java.lang.AutoCloseable
    Represent the tracker for the timeout of the transaction.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.util.concurrent.CompletableFuture<java.lang.Boolean> addTransaction​(long sequenceId, long timeout)
      Add a txnID to the tracker.
      void close()
      Close the transaction timeout tracker and release all resources.
      void replayAddTransaction​(long sequenceId, long timeout)
      When replay the log, add the txnMeta to timer task queue.
      void start()
      When replay the log finished, we need to start the tracker.
    • Method Detail

      • addTransaction

        java.util.concurrent.CompletableFuture<java.lang.Boolean> addTransaction​(long sequenceId,
                                                                                 long timeout)
        Add a txnID to the tracker.
        Parameters:
        sequenceId - the sequenceId
        timeout - the absolute timestamp for transaction timeout
        Returns:
        true if the transaction was added to the tracker or false if had timed out
      • replayAddTransaction

        void replayAddTransaction​(long sequenceId,
                                  long timeout)
        When replay the log, add the txnMeta to timer task queue.
        Parameters:
        sequenceId - the sequenceId
        timeout - the absolute timestamp for transaction timeout
      • start

        void start()
        When replay the log finished, we need to start the tracker.
      • close

        void close()
        Close the transaction timeout tracker and release all resources.
        Specified by:
        close in interface java.lang.AutoCloseable