public class TransactionsStatus
extends java.lang.Object
implements java.io.Serializable
Constructor and Description |
---|
TransactionsStatus(java.util.List<java.lang.Long> completedTransactionSequenceNumbers)
Construct a new transactions status given a list of completed
transactions
|
Modifier and Type | Method and Description |
---|---|
TransactionsStatus |
getClone() |
long |
getHighestCompleted() |
java.util.List<java.lang.Long> |
getTransactionSequenceNumbers()
Get a list of the sequence numbers of completed transactions,
starting with one before which all transactions have completed.
|
boolean |
isCompleted(long seq)
Determine whether the transaction with a given sequence number
has been completed.
|
void |
noteCompleted(long seq)
Note a transaction is completed.
|
void |
recalcAllCompletedBefore(long highestCompleted)
Update the list of completed transactions and recalculate
the sequence number such that all transactions with lower
sequence numbers have been completed, given a sequence
number such that it and all transactions with lower sequence
numbers have been completed.
|
public TransactionsStatus(java.util.List<java.lang.Long> completedTransactionSequenceNumbers)
completedTransactionSequenceNumbers
- a list of
sequence numbers of completed transactions such that
all transactions before the first one listed have been
completed.public TransactionsStatus getClone()
public boolean isCompleted(long seq)
seq
- the sequence number of the transaction whose
completion is to be checkedpublic long getHighestCompleted()
public java.util.List<java.lang.Long> getTransactionSequenceNumbers()
public void recalcAllCompletedBefore(long highestCompleted)
seq
- a sequence number such that it and all transactions
with lower sequence numbers have been completedpublic void noteCompleted(long seq)
seq
- the sequence number of a completed
transaction