org.apache.hadoop.hbase.regionserver
Class ReadWriteConsistencyControl

java.lang.Object
  extended by org.apache.hadoop.hbase.regionserver.ReadWriteConsistencyControl

public class ReadWriteConsistencyControl
extends Object

Manages the read/write consistency within memstore. This provides an interface for readers to determine what entries to ignore, and a mechanism for writers to obtain new write numbers, then "commit" the new writes for readers to read (thus forming atomic transactions).


Nested Class Summary
static class ReadWriteConsistencyControl.WriteEntry
           
 
Field Summary
static long FIXED_SIZE
           
 
Constructor Summary
ReadWriteConsistencyControl()
           
 
Method Summary
 ReadWriteConsistencyControl.WriteEntry beginMemstoreInsert()
           
 void completeMemstoreInsert(ReadWriteConsistencyControl.WriteEntry e)
           
static long getThreadReadPoint()
          Get this thread's read point.
 long memstoreReadPoint()
           
static void resetThreadReadPoint()
          Set the thread RWCC read point to 0 (include everything).
static long resetThreadReadPoint(ReadWriteConsistencyControl rwcc)
          Set the thread RWCC read point to whatever the current read point is in this particular instance of RWCC.
static void setThreadReadPoint(long readPoint)
          Set the thread read point to the given value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FIXED_SIZE

public static final long FIXED_SIZE
Constructor Detail

ReadWriteConsistencyControl

public ReadWriteConsistencyControl()
Method Detail

getThreadReadPoint

public static long getThreadReadPoint()
Get this thread's read point. Used primarily by the memstore scanner to know which values to skip (ie: have not been completed/committed to memstore).


setThreadReadPoint

public static void setThreadReadPoint(long readPoint)
Set the thread read point to the given value. The thread RWCC is used by the Memstore scanner so it knows which values to skip. Give it a value of 0 if you want everything.


resetThreadReadPoint

public static long resetThreadReadPoint(ReadWriteConsistencyControl rwcc)
Set the thread RWCC read point to whatever the current read point is in this particular instance of RWCC. Returns the new thread read point value.


resetThreadReadPoint

public static void resetThreadReadPoint()
Set the thread RWCC read point to 0 (include everything).


beginMemstoreInsert

public ReadWriteConsistencyControl.WriteEntry beginMemstoreInsert()

completeMemstoreInsert

public void completeMemstoreInsert(ReadWriteConsistencyControl.WriteEntry e)

memstoreReadPoint

public long memstoreReadPoint()


Copyright © 2011 The Apache Software Foundation. All Rights Reserved.