org.fusesource.hawtdb.api
Interface IndexVisitor<Key,Value>

Type Parameters:
Key -
Value -

public interface IndexVisitor<Key,Value>

Interface used to selectively visit the entries in a BTree.

Author:
Hiram Chirino

Method Summary
 boolean isInterestedInKeysBetween(Key first, Key second, java.util.Comparator comparator)
          Do you want to visit the range of BTree entries between the first and and second key?
 boolean isSatiated()
           
 void visit(java.util.List<Key> keys, java.util.List<Value> values, java.util.Comparator comparator)
          The keys and values of an index node.
 

Method Detail

isInterestedInKeysBetween

boolean isInterestedInKeysBetween(Key first,
                                  Key second,
                                  java.util.Comparator comparator)
Do you want to visit the range of BTree entries between the first and and second key?

Parameters:
first - if null indicates the range of values before the second key.
second - if null indicates the range of values after the first key.
comparator - the Comparator configured for the index, may be null.
Returns:
true if you want to visit the values between the first and second key.

visit

void visit(java.util.List<Key> keys,
           java.util.List<Value> values,
           java.util.Comparator comparator)
The keys and values of an index node.

Parameters:
keys -
comparator - the Comparator configured for the index, may be null.
values -

isSatiated

boolean isSatiated()
Returns:
true if the visitor has quenched it's thirst for more results


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