org.openrdf.sail.nativerdf.datastore
Class HashIndex

java.lang.Object
  extended by org.openrdf.sail.nativerdf.datastore.HashIndex

public class HashIndex
extends Object

A file-based hash table based on B-Trees.

Author:
Arjohn Kampman

Nested Class Summary
 class HashIndex.IDIterator
           
 
Constructor Summary
HashIndex(File file)
           
 
Method Summary
 void clear()
           
 void close()
           
 File getFile()
           
 HashIndex.IDIterator getIDIterator(int hash)
          Gets an iterator that iterates over the IDs with hash codes that match the specified hash code.
 void removeID(int hash, int id)
          Removes the specified ID from this hash index.
 void storeID(int hash, int id)
          Stores an ID under the specified hash code in this hash index.
 void sync()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HashIndex

public HashIndex(File file)
          throws IOException
Throws:
IOException
Method Detail

getFile

public File getFile()

getIDIterator

public HashIndex.IDIterator getIDIterator(int hash)
                                   throws IOException
Gets an iterator that iterates over the IDs with hash codes that match the specified hash code.

Throws:
IOException

storeID

public void storeID(int hash,
                    int id)
             throws IOException
Stores an ID under the specified hash code in this hash index.

Throws:
IOException

removeID

public void removeID(int hash,
                     int id)
              throws IOException
Removes the specified ID from this hash index.

Throws:
IOException

sync

public void sync()
          throws IOException
Throws:
IOException

clear

public void clear()
           throws IOException
Throws:
IOException

close

public void close()
           throws IOException
Throws:
IOException


Copyright © 2001-2008 Aduna. All Rights Reserved.