org.openrdf.sail.nativerdf.datastore
Class HashFile

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

public class HashFile
extends Object

Class supplying access to a hash file.

Author:
Arjohn Kampman

Nested Class Summary
 class HashFile.IDIterator
           
 
Constructor Summary
HashFile(File file)
           
HashFile(File file, boolean forceSync)
           
 
Method Summary
 void clear()
           
 void close()
           
 void dumpContents(PrintStream out)
           
 int getBucketCount()
           
 int getBucketSize()
           
 File getFile()
           
 FileChannel getFileChannel()
           
 HashFile.IDIterator getIDIterator(int hash)
          Gets an iterator that iterates over the IDs with hash codes that match the specified hash code.
 int getItemCount()
           
 int getRecordSize()
           
static void main(String[] args)
           
 void storeID(int hash, int id)
          Stores ID under the specified hash code in this hash file.
 void sync()
          Syncs any unstored data to the hash file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HashFile

public HashFile(File file)
         throws IOException
Throws:
IOException

HashFile

public HashFile(File file,
                boolean forceSync)
         throws IOException
Throws:
IOException
Method Detail

getFile

public File getFile()

getFileChannel

public FileChannel getFileChannel()

getBucketCount

public int getBucketCount()

getBucketSize

public int getBucketSize()

getItemCount

public int getItemCount()

getRecordSize

public int getRecordSize()

getIDIterator

public HashFile.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 ID under the specified hash code in this hash file.

Throws:
IOException

clear

public void clear()
           throws IOException
Throws:
IOException

sync

public void sync()
          throws IOException
Syncs any unstored data to the hash file.

Throws:
IOException

close

public void close()
           throws IOException
Throws:
IOException

dumpContents

public void dumpContents(PrintStream out)
                  throws IOException
Throws:
IOException

main

public static void main(String[] args)
                 throws Exception
Throws:
Exception


Copyright © 2001-2008 Aduna. All Rights Reserved.