Class BplusBlob
java.lang.Object
com.semedy.reasoner.edb.persistentstore.BplusBlob
- All Implemented Interfaces:
Closeable,AutoCloseable
A blob ist a relation consisting of binary tuples
[id,blob] where id is a unique long and the blob is a byte array
[id,blob] where id is a unique long and the blob is a byte array
- Author:
- angele
-
Field Summary
FieldsModifier and TypeFieldDescriptionthe buffered file for dataBPlusTree<long[],TupleBuffer> the bplus tree for symbols -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancheckSanity(String message) check sanity of treevoidclear()voidclose()booleancontainsKey(long key) booleancontainsKey(TupleBuffer key) voiddelete()voidflush()byte[]getBlob(long key) BPlusTree<long[],TupleBuffer> getKeys()intgetLength(long[] key) booleanlongput(long key, byte[] data) longputCompressed(long key, byte[] compressedData, int originalLength) booleanremove(long key) booleansearchForRecord(long record) voidsetBulkMode(boolean mode) longsize()voidvoid
-
Field Details
-
_keys
the bplus tree for symbols -
_bufferFile
the buffered file for data
-
-
Constructor Details
-
BplusBlob
public BplusBlob(int nodesize, String dir, String name, String endtreefile, String enddatafile, boolean compress) throws IOException, EDBException - Throws:
IOExceptionEDBException
-
BplusBlob
-
-
Method Details
-
searchForRecord
- Throws:
IOException
-
checkSanity
check sanity of tree- Returns:
- Throws:
IOException
-
put
- Throws:
IOExceptionEDBException
-
putCompressed
public long putCompressed(long key, byte[] compressedData, int originalLength) throws IOException, EDBException - Throws:
IOExceptionEDBException
-
getLength
- Throws:
IOException
-
getBlob
- Throws:
IOException
-
containsKey
- Throws:
IOException
-
containsKey
- Throws:
IOException
-
flush
- Throws:
IOExceptionEDBException
-
setBulkMode
- Throws:
IOExceptionEDBException
-
isBulkMode
public boolean isBulkMode() -
clear
- Throws:
IOExceptionEDBException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
delete
- Throws:
IOException
-
transactionRollback
- Throws:
IOException
-
transactionCommit
- Throws:
IOExceptionEDBException
-
remove
- Throws:
IOExceptionEDBException
-
size
public long size() -
getKeys
-