@InterfaceAudience.Private public class PrefixTreeSeeker extends Object implements DataBlockEncoder.EncodedSeeker
| Modifier and Type | Field and Description |
|---|---|
protected ByteBuffer |
block |
protected boolean |
includeMvccVersion |
protected PrefixTreeArraySearcher |
ptSearcher |
| Constructor and Description |
|---|
PrefixTreeSeeker(boolean includeMvccVersion) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
advance() |
int |
compareKey(KeyValue.KVComparator comparator,
byte[] key,
int offset,
int length) |
int |
compareKey(KeyValue.KVComparator comparator,
Cell key) |
Cell |
get()
Currently unused.
|
ByteBuffer |
getKeyDeepCopy() |
Cell |
getKeyValue()
currently must do deep copy into new array
|
ByteBuffer |
getValueShallowCopy() |
boolean |
next() |
void |
releaseCurrentSearcher()
Currently unused.
|
void |
rewind() |
int |
seekToKeyInBlock(byte[] keyOnlyBytes,
int offset,
int length,
boolean forceBeforeOnExactMatch)
Seek forward only (should be called reseekToKeyInBlock?).
|
int |
seekToKeyInBlock(Cell key,
boolean forceBeforeOnExactMatch) |
protected int |
seekToOrBeforeUsingPositionAtOrAfter(byte[] keyOnlyBytes,
int offset,
int length,
boolean seekBefore) |
protected int |
seekToOrBeforeUsingPositionAtOrAfter(Cell kv,
boolean seekBefore) |
protected int |
seekToOrBeforeUsingPositionAtOrBefore(byte[] keyOnlyBytes,
int offset,
int length,
boolean seekBefore) |
protected int |
seekToOrBeforeUsingPositionAtOrBefore(Cell kv,
boolean seekBefore) |
void |
setCurrentBuffer(ByteBuffer fullBlockBuffer) |
protected ByteBuffer block
protected boolean includeMvccVersion
protected PrefixTreeArraySearcher ptSearcher
public void setCurrentBuffer(ByteBuffer fullBlockBuffer)
setCurrentBuffer in interface DataBlockEncoder.EncodedSeekerpublic void releaseCurrentSearcher()
public ByteBuffer getKeyDeepCopy()
getKeyDeepCopy in interface DataBlockEncoder.EncodedSeekerpublic ByteBuffer getValueShallowCopy()
getValueShallowCopy in interface DataBlockEncoder.EncodedSeekerpublic Cell getKeyValue()
getKeyValue in interface DataBlockEncoder.EncodedSeekerpublic Cell get()
public void rewind()
rewind in interface DataBlockEncoder.EncodedSeekerpublic boolean next()
next in interface DataBlockEncoder.EncodedSeekerpublic boolean advance()
public int seekToKeyInBlock(byte[] keyOnlyBytes,
int offset,
int length,
boolean forceBeforeOnExactMatch)
seekToKeyInBlock in interface DataBlockEncoder.EncodedSeekerkeyOnlyBytes - KeyValue format of a Cell's key at which to position the seekeroffset - offset into the keyOnlyBytes arraylength - number of bytes of the keyOnlyBytes array to useforceBeforeOnExactMatch - if an exact match is found and seekBefore=true, back up 1 Cellprotected int seekToOrBeforeUsingPositionAtOrBefore(byte[] keyOnlyBytes,
int offset,
int length,
boolean seekBefore)
protected int seekToOrBeforeUsingPositionAtOrBefore(Cell kv, boolean seekBefore)
protected int seekToOrBeforeUsingPositionAtOrAfter(byte[] keyOnlyBytes,
int offset,
int length,
boolean seekBefore)
protected int seekToOrBeforeUsingPositionAtOrAfter(Cell kv, boolean seekBefore)
public int compareKey(KeyValue.KVComparator comparator, byte[] key, int offset, int length)
compareKey in interface DataBlockEncoder.EncodedSeekerpublic int seekToKeyInBlock(Cell key, boolean forceBeforeOnExactMatch)
seekToKeyInBlock in interface DataBlockEncoder.EncodedSeekerpublic int compareKey(KeyValue.KVComparator comparator, Cell key)
compareKey in interface DataBlockEncoder.EncodedSeekerCopyright © 2007-2016 The Apache Software Foundation. All Rights Reserved.