Class BplusIndexBytes
java.lang.Object
com.semedy.reasoner.edb.persistentstore.BplusIndexBytes
- All Implemented Interfaces:
Closeable,AutoCloseable
-
Field Summary
FieldsModifier and TypeFieldDescriptionthe buffered file for dataBPlusTree<byte[],ByteBuffer> the bplus tree for symbols -
Constructor Summary
ConstructorsConstructorDescriptionBplusIndexBytes(int pagesize, String dir, String name, String endtreefile, String enddatafile, boolean compress) BplusIndexBytes(BPlusTree<byte[], ByteBuffer> btreelong) -
Method Summary
Modifier and TypeMethodDescriptionbooleancheckSanity(String message, boolean shadow) check sanity of treevoidclear()voidclose()booleancontainsKey(byte[] key, boolean shadow) voiddelete()voidflush()byte[]get(byte[] key) byte[]get(long address) longgetAddress(byte[] key, boolean shadow) BPlusTree<byte[],ByteBuffer> getKeys()booleanlongput(byte[] key, byte[] data, boolean shadow) longputData(byte[] data) Write data to data filevoidremove(byte[] key, boolean shadow) voidrollback()voidsetBulkMode(boolean mode) longsize()voidvoidvoid
-
Field Details
-
_keys
the bplus tree for symbols -
_bufferFile
the buffered file for data
-
-
Constructor Details
-
BplusIndexBytes
public BplusIndexBytes(int pagesize, String dir, String name, String endtreefile, String enddatafile, boolean compress) throws IOException, EDBException - Throws:
IOExceptionEDBException
-
BplusIndexBytes
-
-
Method Details
-
checkSanity
check sanity of tree- Returns:
- Throws:
IOException
-
put
- Throws:
IOExceptionEDBException
-
get
- Throws:
IOException
-
get
- Throws:
IOException
-
getAddress
- Throws:
IOException
-
remove
- Throws:
IOExceptionEDBException
-
containsKey
- Throws:
IOException
-
putData
Write data to data file- Parameters:
data-- Returns:
- Throws:
IOException
-
setBulkMode
- Throws:
IOExceptionEDBException
-
isBulkMode
public boolean isBulkMode() -
clear
- Throws:
IOExceptionEDBException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
flush
- Throws:
IOException
-
delete
- Throws:
IOException
-
transactionRollback
- Throws:
IOException
-
transactionBegin
- Throws:
IOException
-
transactionCommit
- Throws:
IOExceptionEDBException
-
size
public long size() -
getKeys
-
rollback
public void rollback()
-