org.fusesource.hawtdb.api
Interface Prefixer<Key>

All Known Implementing Classes:
StringPrefixer

public interface Prefixer<Key>

Interface used to determine the simple prefix of two keys. Used by BTree indexes to implement the variable magnitude optimization.

Author:
Hiram Chirino

Method Summary
 Key getSimplePrefix(Key value1, Key value2)
          This methods should return shortest prefix of value2 where the following still holds:
value1 <= prefix <= value2.
 

Method Detail

getSimplePrefix

Key getSimplePrefix(Key value1,
                    Key value2)
This methods should return shortest prefix of value2 where the following still holds:
value1 <= prefix <= value2.

When this method is called, the following is guaranteed:
value1 < value2

Parameters:
value1 -
value2 -
Returns:


Copyright © 2009-2011 FuseSource, Corp.. All Rights Reserved.