iitb.con.indexing
Interface IndexTree<K extends java.lang.Comparable<K>>

All Known Implementing Classes:
ISAMTree

public interface IndexTree<K extends java.lang.Comparable<K>>

Interface for creating index structures for the instances.


Field Summary
static java.lang.String LEAF_EXT
          Extension of leaf node of the index tree
static java.lang.String NON_LEAF_EXT
          Extension of non-leaf node of the index tree
 
Method Summary
 void close()
          Closes the index structure files.
 void create(java.util.List<Node<K>> nodes)
          Creates the index for given set of key-value pair.
 KeyList<K,java.lang.Short> getMetaIndex(K key)
          Returns the meta-index of the index structure.
 int[] getValues(K key)
          Retrieves the values for the specified key
 

Field Detail

LEAF_EXT

static final java.lang.String LEAF_EXT
Extension of leaf node of the index tree

See Also:
Constant Field Values

NON_LEAF_EXT

static final java.lang.String NON_LEAF_EXT
Extension of non-leaf node of the index tree

See Also:
Constant Field Values
Method Detail

close

void close()
           throws java.io.IOException
Closes the index structure files.

Throws:
java.io.IOException - if the file operation fails

create

void create(java.util.List<Node<K>> nodes)
            throws java.io.IOException
Creates the index for given set of key-value pair.

The key-value pair is represented as Node.

Parameters:
nodes - Node list
Throws:
java.io.IOException - if the file operation fails

getMetaIndex

KeyList<K,java.lang.Short> getMetaIndex(K key)
                                                                        throws java.io.IOException
Returns the meta-index of the index structure. The meta-index is a basically the non-leaf node of the index tree structure.

Parameters:
key - key of the index structure
Returns:
key-id list ; KeyList
Throws:
java.io.IOException - if the file operation fails

getValues

int[] getValues(K key)
                throws java.io.IOException
Retrieves the values for the specified key

Parameters:
key - key of the index structure
Returns:
matched values for the given key
Throws:
java.io.IOException - if the file operation fails