Class OSBTreeBucketV1<K,V>
java.lang.Object
com.orientechnologies.orient.core.storage.impl.local.paginated.base.ODurablePage
com.orientechnologies.orient.core.storage.index.sbtree.local.v1.OSBTreeBucketV1<K,V>
- Since:
- 8/7/13
- Author:
- Andrey Lomakin (a.lomakin-at-orientdb.com)
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from class com.orientechnologies.orient.core.storage.impl.local.paginated.base.ODurablePage
CRC32_OFFSET, MAGIC_NUMBER_OFFSET, MAX_PAGE_SIZE_BYTES, NEXT_FREE_POSITION, WAL_POSITION_OFFSET, WAL_SEGMENT_OFFSET -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAll(List<byte[]> rawEntries, boolean isEncrypted, OBinarySerializer<K> keySerializer, OBinarySerializer<V> valueSerializer) booleanaddLeafEntry(int index, byte[] serializedKey, byte[] serializedValue) booleanaddNonLeafEntry(int index, byte[] key, long leftChild, long rightChild, boolean updateNeighbours) intfind(K key, OEncryption encryption, OBinarySerializer<K> keySerializer) getEntry(int entryIndex, OEncryption encryption, OBinarySerializer<K> keySerializer, OBinarySerializer<V> valueSerializer) getKey(int index, OEncryption encryption, OBinarySerializer<K> keySerializer) longbyte[]getRawEntry(int entryIndex, boolean isEncrypted, OBinarySerializer<K> keySerializer, OBinarySerializer<V> valueSerializer) longlonggetValue(int entryIndex, boolean isEncrypted, OBinarySerializer<K> keySerializer, OBinarySerializer<V> valueSerializer) Obtains the value stored under the given entry index in this bucket.voidinit(boolean isLeaf) booleanisEmpty()booleanisLeaf()voidremoveLeafEntry(int entryIndex, byte[] oldRawKey, byte[] oldRawValue) voidremoveNonLeafEntry(int entryIndex, byte[] key, int prevChild) voidsetLeftSibling(long pageIndex) voidsetRightSibling(long pageIndex) voidsetTreeSize(long size) voidshrink(int newSize, boolean isEncrypted, OBinarySerializer<K> keySerializer, OBinarySerializer<V> valueSerializer) intsize()voidvoidupdateValue(int index, byte[] value, int keySize) Methods inherited from class com.orientechnologies.orient.core.storage.impl.local.paginated.base.ODurablePage
deserializeFromDirectMemory, getBinaryValue, getByteValue, getCacheEntry, getChanges, getIntArray, getIntValue, getLogSequenceNumber, getLogSequenceNumberFromPage, getLongValue, getLSN, getObjectSizeInDirectMemory, getPageData, getPageIndex, getShortValue, moveData, restoreChanges, setBinaryValue, setByteValue, setIntArray, setIntValue, setLongValue, setLsn, setPageLSN, setShortValue, toString
-
Constructor Details
-
OSBTreeBucketV1
-
-
Method Details
-
init
public void init(boolean isLeaf) -
switchBucketType
public void switchBucketType() -
setTreeSize
public void setTreeSize(long size) -
getTreeSize
public long getTreeSize() -
isEmpty
public boolean isEmpty() -
find
-
removeLeafEntry
public void removeLeafEntry(int entryIndex, byte[] oldRawKey, byte[] oldRawValue) -
removeNonLeafEntry
public void removeNonLeafEntry(int entryIndex, byte[] key, int prevChild) -
size
public int size() -
getEntry
public OSBTreeBucketV1.SBTreeEntry<K,V> getEntry(int entryIndex, OEncryption encryption, OBinarySerializer<K> keySerializer, OBinarySerializer<V> valueSerializer) -
getRawEntry
public byte[] getRawEntry(int entryIndex, boolean isEncrypted, OBinarySerializer<K> keySerializer, OBinarySerializer<V> valueSerializer) -
getValue
public OSBTreeValue<V> getValue(int entryIndex, boolean isEncrypted, OBinarySerializer<K> keySerializer, OBinarySerializer<V> valueSerializer) Obtains the value stored under the given entry index in this bucket.- Parameters:
entryIndex- the value entry index.- Returns:
- the obtained value.
-
getKey
-
isLeaf
public boolean isLeaf() -
addAll
public void addAll(List<byte[]> rawEntries, boolean isEncrypted, OBinarySerializer<K> keySerializer, OBinarySerializer<V> valueSerializer) -
shrink
public void shrink(int newSize, boolean isEncrypted, OBinarySerializer<K> keySerializer, OBinarySerializer<V> valueSerializer) -
addLeafEntry
public boolean addLeafEntry(int index, byte[] serializedKey, byte[] serializedValue) -
addNonLeafEntry
public boolean addNonLeafEntry(int index, byte[] key, long leftChild, long rightChild, boolean updateNeighbours) -
updateValue
public void updateValue(int index, byte[] value, int keySize) -
setLeftSibling
public void setLeftSibling(long pageIndex) -
getLeftSibling
public long getLeftSibling() -
setRightSibling
public void setRightSibling(long pageIndex) -
getRightSibling
public long getRightSibling()
-