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 TypeMethodDescriptionboolean
checkSanity
(String message) check sanity of treevoid
clear()
void
close()
boolean
containsKey
(long key) boolean
containsKey
(TupleBuffer key) void
delete()
void
flush()
byte[]
getBlob
(long key) BPlusTree<long[],
TupleBuffer> getKeys()
int
getLength
(long[] key) boolean
long
put
(long key, byte[] data) long
putCompressed
(long key, byte[] compressedData, int originalLength) boolean
remove
(long key) boolean
searchForRecord
(long record) void
setBulkMode
(boolean mode) long
size()
void
void
-
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:
IOException
EDBException
-
BplusBlob
-
-
Method Details
-
searchForRecord
- Throws:
IOException
-
checkSanity
check sanity of tree- Returns:
- Throws:
IOException
-
put
- Throws:
IOException
EDBException
-
putCompressed
public long putCompressed(long key, byte[] compressedData, int originalLength) throws IOException, EDBException - Throws:
IOException
EDBException
-
getLength
- Throws:
IOException
-
getBlob
- Throws:
IOException
-
containsKey
- Throws:
IOException
-
containsKey
- Throws:
IOException
-
flush
- Throws:
IOException
EDBException
-
setBulkMode
- Throws:
IOException
EDBException
-
isBulkMode
public boolean isBulkMode() -
clear
- Throws:
IOException
EDBException
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-
delete
- Throws:
IOException
-
transactionRollback
- Throws:
IOException
-
transactionCommit
- Throws:
IOException
EDBException
-
remove
- Throws:
IOException
EDBException
-
size
public long size() -
getKeys
-