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

All Known Subinterfaces:
SortedIndex<Key,Value>

public interface Index<Key,Value>

Provides Key/Value storage and retrieval.

Author:
Hiram Chirino

Method Summary
 void clear()
          clear the index
 boolean containsKey(Key key)
           
 void destroy()
          Frees any extra storage that the index created.
 Value get(Key key)
           
 int getIndexLocation()
           
 boolean isEmpty()
           
 Value put(Key key, Value entry)
          store the key, item
 Value putIfAbsent(Key key, Value entry)
          get the value at the given key, or put it if null.
 Value remove(Key key)
          remove the index key
 int size()
           
 

Method Detail

destroy

void destroy()
Frees any extra storage that the index created.


clear

void clear()
clear the index

Throws:
java.io.IOException

containsKey

boolean containsKey(Key key)
Parameters:
key -
Returns:
true if it contains the key
Throws:
java.io.IOException

remove

Value remove(Key key)
remove the index key

Parameters:
key -
Returns:
StoreEntry removed
Throws:
java.io.IOException

put

Value put(Key key,
          Value entry)
store the key, item

Parameters:
key -
entry -
Throws:
java.io.IOException

putIfAbsent

Value putIfAbsent(Key key,
                  Value entry)
get the value at the given key, or put it if null.

Parameters:
key -
entry -
Throws:
java.io.IOException

get

Value get(Key key)
Parameters:
key -
Returns:
the entry
Throws:
java.io.IOException

size

int size()

isEmpty

boolean isEmpty()

getIndexLocation

int getIndexLocation()
Returns:
the location where index root resides on the page file.


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