Class BlockedDataFile
java.lang.Object
com.semedy.reasoner.edb.persistentstore.bplustree.DataFileImp
com.semedy.reasoner.edb.persistentstore.bplustree.BlockedDataFile
- All Implemented Interfaces:
DataFile
,Closeable
,AutoCloseable
Manages space in a file. Writes and reads blockwise.
file address is padded and left shifted
leftshift bytes are used to address inside a block.
New data is always appended to file.
file address is padded and left shifted
leftshift bytes are used to address inside a block.
New data is always appended to file.
- Author:
- angele
-
Constructor Summary
-
Method Summary
Methods inherited from class com.semedy.reasoner.edb.persistentstore.bplustree.DataFileImp
checkSanity, checkSanity1, clear, create, delete, free, length, open, readInt, transactionBegin, transactionCommit, transactionRollback, writeCompressed, writeDirect, writeDirect
-
Constructor Details
-
BlockedDataFile
- Parameters:
filePath
-
-
-
Method Details
-
read
Reads data at position from file and returns them- Specified by:
read
in interfaceDataFile
- Overrides:
read
in classDataFileImp
- Parameters:
position
-- Returns:
- Throws:
IOException
-
close
Close file- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in interfaceDataFile
- Overrides:
close
in classDataFileImp
- Throws:
IOException
-
flush
flush file- Specified by:
flush
in interfaceDataFile
- Overrides:
flush
in classDataFileImp
- Throws:
IOException
-
write
write data to file. Returns address of data- Specified by:
write
in interfaceDataFile
- Overrides:
write
in classDataFileImp
- Returns:
- Throws:
IOException
-
elements
iterator for file pieces- Specified by:
elements
in interfaceDataFile
- Overrides:
elements
in classDataFileImp
- Returns:
-