Interface TransactionTimeoutTracker
-
- All Superinterfaces:
java.lang.AutoCloseable
@Beta public interface TransactionTimeoutTracker extends java.lang.AutoCloseableRepresent 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.voidclose()Close the transaction timeout tracker and release all resources.voidreplayAddTransaction(long sequenceId, long timeout)When replay the log, add the txnMeta to timer task queue.voidstart()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 sequenceIdtimeout- 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 sequenceIdtimeout- 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:
closein interfacejava.lang.AutoCloseable
-
-