@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.
|
Modifier and Type | Method and Description |
---|---|
MultiVersionConsistencyControl.WriteEntry |
beginMemstoreInsert()
Generate and return a
MultiVersionConsistencyControl.WriteEntry with a new write number. |
void |
completeMemstoreInsert(MultiVersionConsistencyControl.WriteEntry e)
Complete a
MultiVersionConsistencyControl.WriteEntry that was created by beginMemstoreInsert() . |
void |
initialize(long startPoint)
Initializes the memstoreRead/Write points appropriately.
|
long |
memstoreReadPoint() |
void |
waitForRead(MultiVersionConsistencyControl.WriteEntry e)
Wait for the global readPoint to advance upto
the specified transaction number.
|
public MultiVersionConsistencyControl()
public void initialize(long startPoint)
startPoint
- public MultiVersionConsistencyControl.WriteEntry beginMemstoreInsert()
MultiVersionConsistencyControl.WriteEntry
with a new write number.
To complete the WriteEntry and wait for it to be visible,
call completeMemstoreInsert(WriteEntry)
.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 waitForRead(MultiVersionConsistencyControl.WriteEntry e)
public long memstoreReadPoint()
Copyright © 2014 The Apache Software Foundation. All rights reserved.