Class OIndexOneValue
java.lang.Object
com.orientechnologies.orient.core.index.OIndexAbstract
com.orientechnologies.orient.core.index.OIndexOneValue
- All Implemented Interfaces:
OIndex,OIndexInternal,Comparable<OIndex>
- Direct Known Subclasses:
OIndexDictionary,OIndexUnique
Abstract Index implementation that allows only one value for a key.
- Author:
- Luca Garulli
-
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 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncalculateTxIndexEntry(Object key, ORID backendValue, OTransactionIndexChanges indexChanges) Deprecated.getRidsIgnoreTx(Object key) abstract IndexEngineValidator<Object,ORID> booleanisUnique()put(Object key, OIdentifiable value) Inserts a new entry in the index.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, iterateEntries, iterateEntriesBetween, iterateEntriesMajor, iterateEntriesMinor, keyCursor, keyStream, loadFromConfiguration, loadMetadata, loadMetadataFromDoc, loadMetadataInternal, manualIndexesWarning, rebuild, rebuild, releaseExclusiveLock, releaseSharedLock, remove, 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, isNativeTxSupported
-
Constructor Details
-
OIndexOneValue
-
-
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
-
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.
-
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.
-
size
public long size()- Returns:
- number of entries in the index.
-
stream
-
descStream
-
isUnique
public boolean isUnique()- Specified by:
isUniquein interfaceOIndex- Overrides:
isUniquein classOIndexAbstract
-
calculateTxIndexEntry
-
put
Description copied from interface:OIndexInserts a new entry in the index. The behaviour depends by the index implementation.- Parameters:
key- Entry's keyvalue- Entry's value as OIdentifiable instance- Returns:
- The index instance itself to allow in chain calls
-
getUniqueValidator
-