Class HashFile
- java.lang.Object
-
- org.eclipse.rdf4j.sail.nativerdf.datastore.HashFile
-
- All Implemented Interfaces:
Closeable,AutoCloseable
public class HashFile extends Object implements Closeable
Class supplying access to a hash file.- Author:
- Arjohn Kampman
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classHashFile.IDIterator
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()voidclose()FilegetFile()HashFile.IDIteratorgetIDIterator(int hash)Gets an iterator that iterates over the IDs with hash codes that match the specified hash code.intgetItemCount()voidstoreID(int hash, int id)Stores ID under the specified hash code in this hash file.voidsync()Syncs any unstored data to the hash file.voidsync(boolean force)
-
-
-
Constructor Detail
-
HashFile
public HashFile(File file) throws IOException
- Throws:
IOException
-
HashFile
public HashFile(File file, boolean forceSync) throws IOException
- Throws:
IOException
-
HashFile
public HashFile(File file, boolean forceSync, int initialSize) throws IOException
- Throws:
IOException
-
-
Method Detail
-
getFile
public File getFile()
-
getItemCount
public int getItemCount()
-
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 IOExceptionStores 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 IOExceptionSyncs any unstored data to the hash file.- Throws:
IOException
-
sync
public void sync(boolean force) throws IOException- Throws:
IOException
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
-