Class CellBTreeSingleValueV3<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.singlevalue.v3.CellBTreeSingleValueV3<K>
- All Implemented Interfaces:
OCellBTreeSingleValue<K>
public final class CellBTreeSingleValueV3<K>
extends ODurableComponent
implements OCellBTreeSingleValue<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 (lomakin.andrey-at-gmail.com)
-
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
ConstructorsConstructorDescriptionCellBTreeSingleValueV3(String name, String dataFileExtension, String nullFileExtension, 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(OAtomicOperation atomicOperation, OBinarySerializer<K> keySerializer, OType[] keyTypes, int keySize, OEncryption encryption) voiddelete(OAtomicOperation atomicOperation) voidfirstKey()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 key, ORID value) remove(OAtomicOperation atomicOperation, K key) longsize()booleanvalidatedPut(OAtomicOperation atomicOperation, K key, ORID value, IndexEngineValidator<K, ORID> validator) 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
-
CellBTreeSingleValueV3
public CellBTreeSingleValueV3(String name, String dataFileExtension, String nullFileExtension, OAbstractPaginatedStorage storage)
-
-
Method Details
-
create
public void create(OAtomicOperation atomicOperation, OBinarySerializer<K> keySerializer, OType[] keyTypes, int keySize, OEncryption encryption) - Specified by:
createin interfaceOCellBTreeSingleValue<K>
-
get
- Specified by:
getin interfaceOCellBTreeSingleValue<K>
-
put
- Specified by:
putin interfaceOCellBTreeSingleValue<K>
-
validatedPut
public boolean validatedPut(OAtomicOperation atomicOperation, K key, ORID value, IndexEngineValidator<K, ORID> validator) - Specified by:
validatedPutin interfaceOCellBTreeSingleValue<K>
-
close
public void close()- Specified by:
closein interfaceOCellBTreeSingleValue<K>
-
delete
- Specified by:
deletein interfaceOCellBTreeSingleValue<K>
-
load
public void load(String name, int keySize, OType[] keyTypes, OBinarySerializer<K> keySerializer, OEncryption encryption) - Specified by:
loadin interfaceOCellBTreeSingleValue<K>
-
size
public long size()- Specified by:
sizein interfaceOCellBTreeSingleValue<K>
-
remove
- Specified by:
removein interfaceOCellBTreeSingleValue<K>
-
iterateEntriesMinor
- Specified by:
iterateEntriesMinorin interfaceOCellBTreeSingleValue<K>
-
iterateEntriesMajor
- Specified by:
iterateEntriesMajorin interfaceOCellBTreeSingleValue<K>
-
firstKey
- Specified by:
firstKeyin interfaceOCellBTreeSingleValue<K>
-
lastKey
- Specified by:
lastKeyin interfaceOCellBTreeSingleValue<K>
-
keyStream
- Specified by:
keyStreamin interfaceOCellBTreeSingleValue<K>
-
allEntries
- Specified by:
allEntriesin interfaceOCellBTreeSingleValue<K>
-
iterateEntriesBetween
public Stream<ORawPair<K,ORID>> iterateEntriesBetween(K keyFrom, boolean fromInclusive, K keyTo, boolean toInclusive, boolean ascSortOrder) - Specified by:
iterateEntriesBetweenin interfaceOCellBTreeSingleValue<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 interfaceOCellBTreeSingleValue<K>
-
fetchBackwardNextCachePortion
-