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.
 

Method Detail

indexOf

int indexOf(java.nio.ByteBuffer index,
            byte[] key,
            int indexSize)
Search for the key in the buffer.

Parameters:
index - The index buffer
key - The key to search for
indexSize - 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