voldemort.store.readonly
Interface SearchStrategy
- All Known Implementing Classes:
- BinarySearchStrategy, InterpolationSearchStrategy
public interface SearchStrategy
A way to search for a key in a file of sorted 16 byte keys and 4 byte
position offsets
Method Summary |
int |
indexOf(java.nio.ByteBuffer index,
byte[] key,
int indexSize)
Search for the key in the buffer. |
indexOf
int indexOf(java.nio.ByteBuffer index,
byte[] key,
int indexSize)
- Search for the key in the buffer.
- Parameters:
index
- The index bufferkey
- The key to search forindexSize
- The size of the index
- Returns:
- The integer offset of the position offset, if the key is found,
else -1
Jay Kreps, Roshan Sumbaly, Alex Feinberg, Bhupesh Bansal, Lei Gao, Chinmay Soman, Vinoth Chandar, Zhongjie Wu