@InterfaceAudience.Private public class MultiVersionConsistencyControl extends Object
Modifier and Type | Class and Description |
---|---|
static class |
MultiVersionConsistencyControl.WriteEntry |
Modifier and Type | Field and Description |
---|---|
static long |
FIXED_SIZE |
Constructor and Description |
---|
MultiVersionConsistencyControl()
Default constructor.
|
public MultiVersionConsistencyControl()
public void initialize(long startPoint)
startPoint
- public static long getPreAssignedWriteNumber(AtomicLong sequenceId)
sequenceId
- public MultiVersionConsistencyControl.WriteEntry beginMemstoreInsertWithSeqNum(long curSeqNum)
curSeqNum
- public void completeMemstoreInsertWithSeqNum(MultiVersionConsistencyControl.WriteEntry e, SequenceId seqId) throws IOException
MultiVersionConsistencyControl.WriteEntry
that was created by
beginMemstoreInsertWithSeqNum(long)
. At the end of this call, the global read
point is at least as large as the write point of the passed in WriteEntry. Thus, the write is
visible to MVCC readers.IOException
public void cancelMemstoreInsert(MultiVersionConsistencyControl.WriteEntry writeEntry)
getPreAssignedWriteNumber(AtomicLong)
just to mark
it as for special handling).writeEntry
- Failed attempt at write. Does cleanup.public void completeMemstoreInsert(MultiVersionConsistencyControl.WriteEntry e)
MultiVersionConsistencyControl.WriteEntry
that was created by beginMemstoreInsert()
. At the
end of this call, the global read point is at least as large as the write point of the passed
in WriteEntry. Thus, the write is visible to MVCC readers.public void waitForPreviousTransactionsComplete()
public void waitForPreviousTransactionsComplete(MultiVersionConsistencyControl.WriteEntry waitedEntry)
public long memstoreReadPoint()