Class OIndexUnique
java.lang.Object
com.orientechnologies.orient.core.index.OIndexAbstract
com.orientechnologies.orient.core.index.OIndexOneValue
com.orientechnologies.orient.core.index.OIndexUnique
- All Implemented Interfaces:
OIndex,OIndexInternal,Comparable<OIndex>
Index implementation that allows only one value for a 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 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanInterprets transaction index changes for a certain key.booleanbooleanMethods inherited from class com.orientechnologies.orient.core.index.OIndexOneValue
calculateTxIndexEntry, descStream, get, getRids, getRidsIgnoreTx, isUnique, put, size, stream, streamEntries, streamEntriesBetween, streamEntriesMajor, streamEntriesMinorMethods 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, isAutomatic, isRebuilding, iterateEntries, iterateEntriesBetween, iterateEntriesMajor, iterateEntriesMinor, keyCursor, keyStream, loadFromConfiguration, loadMetadata, loadMetadataFromDoc, loadMetadataInternal, manualIndexesWarning, rebuild, rebuild, releaseExclusiveLock, releaseSharedLock, remove, remove, removeCluster, toString, updateConfiguration
-
Constructor Details
-
OIndexUnique
-
-
Method Details
-
isNativeTxSupported
public boolean isNativeTxSupported() -
canBeUsedInEqualityOperators
public boolean canBeUsedInEqualityOperators() -
supportsOrderedIterations
public boolean supportsOrderedIterations() -
interpretTxKeyChanges
public Iterable<OStorageTransactionIndexChange> interpretTxKeyChanges(OTransactionIndexChangesPerKey changes) Description copied from class:OIndexAbstractInterprets transaction index changes for a certain key. Override it to customize index behaviour on interpreting index changes. This may be viewed as an optimization, but in some cases this is a requirement. For example, if you put multiple values under the same key during the transaction for single-valued/unique index, but remove all of them except one before commit, there is no point in throwingORecordDuplicatedExceptionwhile applying index changes.- Specified by:
interpretTxKeyChangesin interfaceOIndexInternal- Overrides:
interpretTxKeyChangesin classOIndexAbstract- Parameters:
changes- the changes to interpret.- Returns:
- the interpreted index key changes.
-
getUniqueValidator
- Specified by:
getUniqueValidatorin classOIndexOneValue
-