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 class
HashFile.IDIterator
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
void
close()
File
getFile()
HashFile.IDIterator
getIDIterator(int hash)
Gets an iterator that iterates over the IDs with hash codes that match the specified hash code.int
getItemCount()
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.void
sync(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 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
-
sync
public void sync(boolean force) throws IOException
- Throws:
IOException
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-
-