Class CellBTreeMultiValueV2<K>
java.lang.Object
com.orientechnologies.common.concur.resource.OSharedResourceAbstract
com.orientechnologies.orient.core.storage.impl.local.paginated.base.ODurableComponent
com.orientechnologies.orient.core.storage.index.sbtree.multivalue.v2.CellBTreeMultiValueV2<K>
- All Implemented Interfaces:
OCellBTreeMultiValue<K>
public final class CellBTreeMultiValueV2<K>
extends ODurableComponent
implements OCellBTreeMultiValue<K>
This is implementation which is based on B+-tree implementation threaded tree. The main
differences are:
- Buckets are not compacted/removed if they are empty after deletion of item. They reused later when new items are added.
- All non-leaf buckets have links to neighbor buckets which contain keys which are less/more
than keys contained in current bucket
- 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.ODurableComponent
atomicOperationsManager, readCache, storage, writeCacheFields inherited from class com.orientechnologies.common.concur.resource.OSharedResourceAbstract
lock -
Constructor Summary
ConstructorsConstructorDescriptionCellBTreeMultiValueV2(String name, String dataFileExtension, String nullFileExtension, String containerExtension, OAbstractPaginatedStorage storage) -
Method Summary
Modifier and TypeMethodDescriptionvoidAcquires exclusive lock in the active atomic operation running on the current thread for this SB-tree.voidclose()voidcreate(OBinarySerializer<K> keySerializer, OType[] keyTypes, int keySize, OEncryption encryption, OAtomicOperation atomicOperation) voiddelete(OAtomicOperation atomicOperation) firstKey()iterateEntriesBetween(K keyFrom, boolean fromInclusive, K keyTo, boolean toInclusive, boolean ascSortOrder) iterateEntriesMajor(K key, boolean inclusive, boolean ascSortOrder) iterateEntriesMinor(K key, boolean inclusive, boolean ascSortOrder) lastKey()voidload(String name, int keySize, OType[] keyTypes, OBinarySerializer<K> keySerializer, OEncryption encryption) voidput(OAtomicOperation atomicOperation, K pk, ORID value) booleanremove(OAtomicOperation atomicOperation, K k, ORID value) longsize()Methods inherited from class com.orientechnologies.orient.core.storage.impl.local.paginated.base.ODurableComponent
addFile, addPage, calculateInsideComponentOperation, deleteFile, executeInsideComponentOperation, getExtension, getFilledUpTo, getFullName, getLockName, getName, isFileExists, loadOrAddPageForWrite, loadPageForRead, loadPageForWrite, openFile, releasePageFromRead, releasePageFromWrite, setName, truncateFile, tryExecuteInsideComponentOperationMethods inherited from class com.orientechnologies.common.concur.resource.OSharedResourceAbstract
acquireExclusiveLock, acquireSharedLock, releaseExclusiveLock, releaseSharedLock
-
Constructor Details
-
CellBTreeMultiValueV2
public CellBTreeMultiValueV2(String name, String dataFileExtension, String nullFileExtension, String containerExtension, OAbstractPaginatedStorage storage)
-
-
Method Details
-
create
public void create(OBinarySerializer<K> keySerializer, OType[] keyTypes, int keySize, OEncryption encryption, OAtomicOperation atomicOperation) - Specified by:
createin interfaceOCellBTreeMultiValue<K>
-
get
- Specified by:
getin interfaceOCellBTreeMultiValue<K>
-
put
- Specified by:
putin interfaceOCellBTreeMultiValue<K>
-
close
public void close()- Specified by:
closein interfaceOCellBTreeMultiValue<K>
-
delete
- Specified by:
deletein interfaceOCellBTreeMultiValue<K>
-
load
public void load(String name, int keySize, OType[] keyTypes, OBinarySerializer<K> keySerializer, OEncryption encryption) - Specified by:
loadin interfaceOCellBTreeMultiValue<K>
-
size
public long size()- Specified by:
sizein interfaceOCellBTreeMultiValue<K>
-
remove
- Specified by:
removein interfaceOCellBTreeMultiValue<K>
-
iterateEntriesMinor
- Specified by:
iterateEntriesMinorin interfaceOCellBTreeMultiValue<K>
-
iterateEntriesMajor
- Specified by:
iterateEntriesMajorin interfaceOCellBTreeMultiValue<K>
-
firstKey
- Specified by:
firstKeyin interfaceOCellBTreeMultiValue<K>
-
lastKey
- Specified by:
lastKeyin interfaceOCellBTreeMultiValue<K>
-
keyStream
- Specified by:
keyStreamin interfaceOCellBTreeMultiValue<K>
-
iterateEntriesBetween
public Stream<ORawPair<K,ORID>> iterateEntriesBetween(K keyFrom, boolean fromInclusive, K keyTo, boolean toInclusive, boolean ascSortOrder) - Specified by:
iterateEntriesBetweenin interfaceOCellBTreeMultiValue<K>
-
acquireAtomicExclusiveLock
public void acquireAtomicExclusiveLock()Acquires exclusive lock in the active atomic operation running on the current thread for this SB-tree.- Specified by:
acquireAtomicExclusiveLockin interfaceOCellBTreeMultiValue<K>
-