Class OIndexMultiValues
java.lang.Object
com.orientechnologies.orient.core.index.OIndexAbstract
com.orientechnologies.orient.core.index.OIndexMultiValues
- All Implemented Interfaces:
OIndex,OIndexInternal,Comparable<OIndex>
- Direct Known Subclasses:
OIndexFullText,OIndexNotUnique
Abstract index implementation that supports multi-values for the same key.
- Author:
- Luca Garulli (l.garulli--(at)--orientdb.com)
-
Nested Class Summary
Nested classes/interfaces inherited from class com.orientechnologies.orient.core.index.OIndexAbstract
OIndexAbstract.PartialSearchMode -
Field Summary
Fields inherited from class com.orientechnologies.orient.core.index.OIndexAbstract
apiVersion, CONFIG_MAP_RID, im, indexId, storageFields inherited from interface com.orientechnologies.orient.core.index.OIndexInternal
ALGORITHM, CONFIG_AUTOMATIC, CONFIG_KEYTYPE, CONFIG_NAME, CONFIG_TYPE, INDEX_DEFINITION, INDEX_DEFINITION_CLASS, INDEX_VERSION, MERGE_KEYS, METADATA, VALUE_CONTAINER_ALGORITHM -
Method Summary
Modifier and TypeMethodDescriptionstatic Set<OIdentifiable>calculateTxValue(Object key, OTransactionIndexChanges indexChanges) Deprecated.getRidsIgnoreTx(Object key) booleanput(Object key, OIdentifiable singleValue) Inserts a new entry in the index.booleanremove(Object key, OIdentifiable value) Removes an entry by its key and value.longsize()stream()streamEntries(Collection<?> keys, boolean ascSortOrder) Returns stream which presents data associated with passed in keys.streamEntriesBetween(Object fromKey, boolean fromInclusive, Object toKey, boolean toInclusive, boolean ascOrder) Returns stream which presents subset of index data between passed in keys.streamEntriesMajor(Object fromKey, boolean fromInclusive, boolean ascOrder) Returns stream which presents subset of data which associated with key which is greater than passed in key.streamEntriesMinor(Object toKey, boolean toInclusive, boolean ascOrder) Returns stream which presents subset of data which associated with key which is less than passed in key.Methods inherited from class com.orientechnologies.orient.core.index.OIndexAbstract
acquireAtomicExclusiveLock, acquireExclusiveLock, acquireSharedLock, addCluster, clear, close, compareTo, count, create, cursor, delete, descCursor, doDelete, doReloadIndexEngine, enhanceFromCompositeKeyBetweenAsc, enhanceFromCompositeKeyBetweenDesc, enhanceToCompositeKeyBetweenAsc, enhanceToCompositeKeyBetweenDesc, equals, flush, getAlgorithm, getClusters, getCollatingValue, getConfiguration, getDatabase, getDatabaseName, getDefinition, getFirstKey, getIndexId, getIndexNameByKey, getInternal, getKeySize, getKeyTypes, getLastKey, getMetadata, getName, getRebuildVersion, getSize, getType, getVersion, hashCode, hasRangeQuerySupport, interpretTxKeyChanges, isAutomatic, isRebuilding, isUnique, iterateEntries, iterateEntriesBetween, iterateEntriesMajor, iterateEntriesMinor, keyCursor, keyStream, loadFromConfiguration, loadMetadata, loadMetadataFromDoc, loadMetadataInternal, manualIndexesWarning, rebuild, rebuild, releaseExclusiveLock, releaseSharedLock, remove, removeCluster, toString, updateConfigurationMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.orientechnologies.orient.core.index.OIndex
supportsOrderedIterationsMethods inherited from interface com.orientechnologies.orient.core.index.OIndexInternal
canBeUsedInEqualityOperators
-
Method Details
-
get
Deprecated.Description copied from interface:OIndexGets the set of records associated with the passed key.- Parameters:
key- The key to search- Returns:
- The Record set if found, otherwise an empty Set
-
getRidsIgnoreTx
-
getRids
-
put
Description copied from interface:OIndexInserts a new entry in the index. The behaviour depends by the index implementation.- Parameters:
key- Entry's keysingleValue- Entry's value as OIdentifiable instance- Returns:
- The index instance itself to allow in chain calls
-
isNativeTxSupported
public boolean isNativeTxSupported() -
remove
Description copied from interface:OIndexRemoves an entry by its key and value.- Specified by:
removein interfaceOIndex- Overrides:
removein classOIndexAbstract- Parameters:
key- The entry's key to remove- Returns:
- True if the entry has been found and removed, otherwise false
-
streamEntriesBetween
public Stream<ORawPair<Object,ORID>> streamEntriesBetween(Object fromKey, boolean fromInclusive, Object toKey, boolean toInclusive, boolean ascOrder) Description copied from interface:OIndexInternalReturns stream which presents subset of index data between passed in keys.- Parameters:
fromKey- Lower border of index data.fromInclusive- Indicates whether lower border should be inclusive or exclusive.toKey- Upper border of index data.toInclusive- Indicates whether upper border should be inclusive or exclusive.ascOrder- Flag which determines whether data iterated by stream should be in ascending or descending order.- Returns:
- Cursor which presents subset of index data between passed in keys.
-
streamEntriesMajor
public Stream<ORawPair<Object,ORID>> streamEntriesMajor(Object fromKey, boolean fromInclusive, boolean ascOrder) Description copied from interface:OIndexInternalReturns stream which presents subset of data which associated with key which is greater than passed in key.- Parameters:
fromKey- Lower border of index data.fromInclusive- Indicates whether lower border should be inclusive or exclusive.ascOrder- Flag which determines whether data iterated by stream should be in ascending or descending order.- Returns:
- stream which presents subset of data which associated with key which is greater than passed in key.
-
streamEntriesMinor
public Stream<ORawPair<Object,ORID>> streamEntriesMinor(Object toKey, boolean toInclusive, boolean ascOrder) Description copied from interface:OIndexInternalReturns stream which presents subset of data which associated with key which is less than passed in key.- Parameters:
toKey- Upper border of index data.toInclusive- Indicates Indicates whether upper border should be inclusive or exclusive.ascOrder- Flag which determines whether data iterated by stream should be in ascending or descending order.- Returns:
- stream which presents subset of data which associated with key which is less than passed in key.
-
streamEntries
Description copied from interface:OIndexInternalReturns stream which presents data associated with passed in keys.- Parameters:
keys- Keys data of which should be returned.ascSortOrder- Flag which determines whether data iterated by stream should be in ascending or descending order.- Returns:
- stream which presents data associated with passed in keys.
-
calculateTxValue
public static Set<OIdentifiable> calculateTxValue(Object key, OTransactionIndexChanges indexChanges) -
size
public long size()- Returns:
- number of entries in the index.
-
stream
-
descStream
-