org.openrdf.sesame.sailimpl.nativerdf.datastore
Class DataFile
java.lang.Object
org.openrdf.sesame.sailimpl.nativerdf.datastore.DataFile
- public class DataFile
- extends Object
Class supplying access to a data file. A data file stores data sequentially.
Each entry starts with the entry's length (4 bytes), followed by the data
itself. File offsets are used to identify entries.
- Version:
- $Revision: 1.11.4.4 $
- Author:
- Arjohn Kampman
DataFile
public DataFile(File file)
throws IOException
startTransaction
public void startTransaction(boolean isolateTransaction)
throws IOException
- Throws:
IOException
commitTransaction
public void commitTransaction()
throws IOException
- Throws:
IOException
rollbackTransaction
public void rollbackTransaction()
throws IOException
- Throws:
IOException
storeData
public long storeData(byte[] data)
throws IOException
- Stores the specified data and returns the byte-offset at which it has
been stored.
- Throws:
IOException
updateData
public void updateData(long offset,
byte[] data)
throws IOException
- Updates (replaces) the data at the specified offset with the supplied data.
- Throws:
IOException
getData
public byte[] getData(long offset,
boolean dirtyReads)
throws IOException
- Gets the data that is stored at the specified offset.
- Parameters:
offset - An offset in the data file.dirtyReads - Flag indicating whether data that hasn't been committed
yet should be searched too.
- Returns:
- The data that was found on the specified offset.
- Throws:
IOException - If an I/O error occurred.
clear
public void clear()
throws IOException
- Throws:
IOException
close
public void close()
throws IOException
- Throws:
IOException
iterator
public DataFile.DataIterator iterator()
Copyright © 2002-2006 Aduna BV, GNU LGPL License applies.