Class OAutoShardingIndexEngine
java.lang.Object
com.orientechnologies.orient.core.sharding.auto.OAutoShardingIndexEngine
- All Implemented Interfaces:
OBaseIndexEngine,OIndexEngine
Index engine implementation that relies on multiple hash indexes partitioned by key.
- Author:
- Luca Garulli (l.garulli--(at)--orientdb.com)
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionbooleanAcquires exclusive lock in the active atomic operation running on the current thread for this index engine.voidclear(OAtomicOperation atomicOperation) voidclose()voidcreate(OAtomicOperation atomicOperation, IndexEngineData data) voiddelete(OAtomicOperation atomicOperation) descStream(IndexEngineValuesTransformer valuesTransformer) voidflush()intgetId()getIndexNameByKey(Object key) getName()intbooleanbooleanvoidinit(OIndexMetadata metadata) iterateEntriesBetween(Object rangeFrom, boolean fromInclusive, Object rangeTo, boolean toInclusive, boolean ascSortOrder, IndexEngineValuesTransformer transformer) iterateEntriesMajor(Object fromKey, boolean isInclusive, boolean ascSortOrder, IndexEngineValuesTransformer transformer) iterateEntriesMinor(Object toKey, boolean isInclusive, boolean ascSortOrder, IndexEngineValuesTransformer transformer) voidload(IndexEngineData data) voidput(OAtomicOperation atomicOperation, Object key, ORID value) voidput(OAtomicOperation atomicOperation, Object key, Object value) booleanremove(OAtomicOperation atomicOperation, Object key) booleanremove(OAtomicOperation atomicOperation, Object key, ORID value) longsize(IndexEngineValuesTransformer transformer) stream(IndexEngineValuesTransformer valuesTransformer) voidupdate(OAtomicOperation atomicOperation, Object key, OIndexKeyUpdater<Object> updater) voidbooleanvalidatedPut(OAtomicOperation atomicOperation, Object key, ORID value, IndexEngineValidator<Object, ORID> validator) Puts the given value under the given key into this index engine.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.orientechnologies.orient.core.index.engine.OBaseIndexEngine
applyTxChangesMethods inherited from interface com.orientechnologies.orient.core.index.engine.OIndexEngine
getEngineAPIVersion
-
Field Details
-
VERSION
public static final int VERSION- See Also:
-
-
Method Details
-
getId
public int getId()- Specified by:
getIdin interfaceOBaseIndexEngine
-
getName
- Specified by:
getNamein interfaceOBaseIndexEngine
-
getStrategy
-
create
- Specified by:
createin interfaceOBaseIndexEngine- Throws:
IOException
-
load
- Specified by:
loadin interfaceOBaseIndexEngine
-
flush
public void flush()- Specified by:
flushin interfaceOBaseIndexEngine
-
delete
- Specified by:
deletein interfaceOBaseIndexEngine
-
init
- Specified by:
initin interfaceOBaseIndexEngine
-
remove
- Specified by:
removein interfaceOBaseIndexEngine- Specified by:
removein interfaceOIndexEngine
-
clear
- Specified by:
clearin interfaceOBaseIndexEngine
-
close
public void close()- Specified by:
closein interfaceOBaseIndexEngine
-
get
- Specified by:
getin interfaceOIndexEngine
-
put
- Specified by:
putin interfaceOBaseIndexEngine- Specified by:
putin interfaceOIndexEngine
-
put
- Specified by:
putin interfaceOIndexEngine
-
remove
- Specified by:
removein interfaceOBaseIndexEngine- Specified by:
removein interfaceOIndexEngine
-
update
- Specified by:
updatein interfaceOIndexEngine
-
validatedPut
public boolean validatedPut(OAtomicOperation atomicOperation, Object key, ORID value, IndexEngineValidator<Object, ORID> validator) Description copied from interface:OIndexEnginePuts the given value under the given key into this index engine. Validates the operation using the provided validator.- Specified by:
validatedPutin interfaceOBaseIndexEngine- Specified by:
validatedPutin interfaceOIndexEnginekey- the key to put the value under.value- the value to put.validator- the operation validator.- Returns:
trueif the validator allowed the put,falseotherwise.- See Also:
-
size
- Specified by:
sizein interfaceOBaseIndexEngine
-
hasRangeQuerySupport
public boolean hasRangeQuerySupport()- Specified by:
hasRangeQuerySupportin interfaceOBaseIndexEngine
-
stream
- Specified by:
streamin interfaceOBaseIndexEngine
-
descStream
- Specified by:
descStreamin interfaceOBaseIndexEngine
-
keyStream
- Specified by:
keyStreamin interfaceOBaseIndexEngine
-
iterateEntriesBetween
public Stream<ORawPair<Object,ORID>> iterateEntriesBetween(Object rangeFrom, boolean fromInclusive, Object rangeTo, boolean toInclusive, boolean ascSortOrder, IndexEngineValuesTransformer transformer) - Specified by:
iterateEntriesBetweenin interfaceOBaseIndexEngine
-
iterateEntriesMajor
public Stream<ORawPair<Object,ORID>> iterateEntriesMajor(Object fromKey, boolean isInclusive, boolean ascSortOrder, IndexEngineValuesTransformer transformer) - Specified by:
iterateEntriesMajorin interfaceOBaseIndexEngine
-
iterateEntriesMinor
public Stream<ORawPair<Object,ORID>> iterateEntriesMinor(Object toKey, boolean isInclusive, boolean ascSortOrder, IndexEngineValuesTransformer transformer) - Specified by:
iterateEntriesMinorin interfaceOBaseIndexEngine
-
acquireAtomicExclusiveLock
Description copied from interface:OBaseIndexEngineAcquires exclusive lock in the active atomic operation running on the current thread for this index engine.If this index engine supports a more narrow locking, for example key-based sharding, it may use the provided
keyto infer a more narrow lock scope, but that is not a requirement.- Specified by:
acquireAtomicExclusiveLockin interfaceOBaseIndexEngine- Parameters:
key- the index key to lock.- Returns:
trueif this index was locked entirely,falseif this index locking is sensitive to the providedkeyand only some subset of this index was locked.
-
getIndexNameByKey
- Specified by:
getIndexNameByKeyin interfaceOBaseIndexEngine
-
updateUniqueIndexVersion
- Specified by:
updateUniqueIndexVersionin interfaceOBaseIndexEngine
-
getUniqueIndexVersion
- Specified by:
getUniqueIndexVersionin interfaceOBaseIndexEngine
-
hasRidBagTreesSupport
public boolean hasRidBagTreesSupport()- Specified by:
hasRidBagTreesSupportin interfaceOBaseIndexEngine
-