Class BplusIndexBytes
java.lang.Object
com.semedy.reasoner.edb.persistentstore.BplusIndexBytes
- All Implemented Interfaces:
Closeable
,AutoCloseable
-
Field Summary
Modifier and TypeFieldDescriptionthe buffered file for dataBPlusTree<byte[],
ByteBuffer> the bplus tree for symbols -
Constructor Summary
ConstructorDescriptionBplusIndexBytes
(int pagesize, String dir, String name, String endtreefile, String enddatafile, boolean compress) BplusIndexBytes
(BPlusTree<byte[], ByteBuffer> btreelong) -
Method Summary
Modifier and TypeMethodDescriptionboolean
checkSanity
(String message, boolean shadow) check sanity of treevoid
clear()
void
close()
boolean
containsKey
(byte[] key, boolean shadow) void
delete()
void
flush()
byte[]
get
(byte[] key) byte[]
get
(long address) long
getAddress
(byte[] key, boolean shadow) BPlusTree<byte[],
ByteBuffer> getKeys()
boolean
long
put
(byte[] key, byte[] data, boolean shadow) long
putData
(byte[] data) Write data to data filevoid
remove
(byte[] key, boolean shadow) void
rollback()
void
setBulkMode
(boolean mode) long
size()
void
void
void
-
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:
IOException
EDBException
-
BplusIndexBytes
-
-
Method Details
-
checkSanity
check sanity of tree- Returns:
- Throws:
IOException
-
put
- Throws:
IOException
EDBException
-
get
- Throws:
IOException
-
get
- Throws:
IOException
-
getAddress
- Throws:
IOException
-
remove
- Throws:
IOException
EDBException
-
containsKey
- Throws:
IOException
-
putData
Write data to data file- Parameters:
data
-- Returns:
- Throws:
IOException
-
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
-
flush
- Throws:
IOException
-
delete
- Throws:
IOException
-
transactionRollback
- Throws:
IOException
-
transactionBegin
- Throws:
IOException
-
transactionCommit
- Throws:
IOException
EDBException
-
size
public long size() -
getKeys
-
rollback
public void rollback()
-