|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openrdf.sail.nativerdf.datastore.DataStore
public class DataStore
Class that provides indexed storage and retrieval of arbitrary length data.
| Constructor Summary | |
|---|---|
DataStore(File dataDir,
String filePrefix)
|
|
DataStore(File dataDir,
String filePrefix,
boolean forceSync)
|
|
| Method Summary | |
|---|---|
void |
clear()
Removes all values from the DataStore. |
void |
close()
Closes the DataStore, releasing any file references, etc. |
byte[] |
getData(int id)
Gets the value for the specified ID. |
int |
getID(byte[] queryData)
Gets the ID for the specified value. |
int |
getMaxID()
Returns the maximum value-ID that is in use. |
static void |
main(String[] args)
|
int |
storeData(byte[] data)
Stores the supplied value and returns the ID that has been assigned to it. |
void |
sync()
Synchronizes any recent changes to the data to disk. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DataStore(File dataDir,
String filePrefix)
throws IOException
IOException
public DataStore(File dataDir,
String filePrefix,
boolean forceSync)
throws IOException
IOException| Method Detail |
|---|
public byte[] getData(int id)
throws IOException
id - A value ID, should be larger than 0.
IOException - If an I/O error occurred.
public int getID(byte[] queryData)
throws IOException
queryData - The value to get the ID for, must not be null.
IOException - If an I/O error occurred.
public int getMaxID()
throws IOException
IOException - If an I/O error occurs.
public int storeData(byte[] data)
throws IOException
data - The data to store, must not be null.
IOException - If an I/O error occurred.
public void sync()
throws IOException
IOException - If an I/O error occurred.
public void clear()
throws IOException
IOException - If an I/O error occurred.
public void close()
throws IOException
IOException - If an I/O error occurred.
public static void main(String[] args)
throws Exception
Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||