Interface OIndexInternal
- All Superinterfaces:
Comparable<OIndex>,OIndex
- All Known Implementing Classes:
OIndexAbstract,OIndexDictionary,OIndexFullText,OIndexMultiValues,OIndexNotUnique,OIndexOneValue,OIndexUnique,OLuceneFullTextIndex,OLuceneIndexNotUnique,OLuceneSpatialIndex
Interface to handle index.
- 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.addCluster(String iClusterName) Add given cluster to the list of clusters that should be automatically indexed.booleanvoidclose()create(OIndexMetadata metadata, boolean rebuild, OProgressListener progressListener) getCollatingValue(Object key) intgetIndexNameByKey(Object key) Returns the index name for a key.getRidsIgnoreTx(Object key) booleanstatic booleanisLabelSecurityDefined(ODatabaseDocumentInternal database, OSecurityInternal security, String indexClass, String propertyName) booleanstatic booleanisReadRestrictedBySecurityPolicy(String indexClass, ODatabaseDocumentInternal db, OSecurityInternal security) booleanloadFromConfiguration(ODocument iConfig) Loads the index giving the configuration.loadMetadata(ODocument iConfig) removeCluster(String iClusterName) Remove given cluster from the list of clusters that should be automatically indexed.static OIdentifiablesecurityFilterOnRead(OIndex idx, OIdentifiable item) static CollectionsecurityFilterOnRead(OIndex idx, Collection<OIdentifiable> items) 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.Saves the index configuration to disk.Methods inherited from interface java.lang.Comparable
compareToMethods inherited from interface com.orientechnologies.orient.core.index.OIndex
clear, count, cursor, delete, descCursor, flush, get, getAlgorithm, getClusters, getConfiguration, getDatabaseName, getDefinition, getFirstKey, getInternal, getKeySize, getKeyTypes, getLastKey, getMetadata, getName, getRebuildVersion, getSize, getType, getVersion, isAutomatic, isRebuilding, isUnique, iterateEntries, iterateEntriesBetween, iterateEntriesMajor, iterateEntriesMinor, keyCursor, put, rebuild, rebuild, remove, remove, supportsOrderedIterations
-
Field Details
-
CONFIG_KEYTYPE
- See Also:
-
CONFIG_AUTOMATIC
- See Also:
-
CONFIG_TYPE
- See Also:
-
ALGORITHM
- See Also:
-
VALUE_CONTAINER_ALGORITHM
- See Also:
-
CONFIG_NAME
- See Also:
-
INDEX_DEFINITION
- See Also:
-
INDEX_DEFINITION_CLASS
- See Also:
-
INDEX_VERSION
- See Also:
-
METADATA
- See Also:
-
MERGE_KEYS
- See Also:
-
-
Method Details
-
getCollatingValue
-
loadFromConfiguration
Loads the index giving the configuration.- Parameters:
iConfig- ODocument instance containing the configuration
-
updateConfiguration
ODocument updateConfiguration()Saves the index configuration to disk.- Returns:
- The configuration as ODocument instance
- See Also:
-
addCluster
Add given cluster to the list of clusters that should be automatically indexed.- Parameters:
iClusterName- Cluster to add.- Returns:
- Current index instance.
-
removeCluster
Remove given cluster from the list of clusters that should be automatically indexed.- Parameters:
iClusterName- Cluster to remove.- Returns:
- Current index instance.
-
canBeUsedInEqualityOperators
boolean canBeUsedInEqualityOperators() -
hasRangeQuerySupport
boolean hasRangeQuerySupport() -
loadMetadata
-
close
void close() -
getIndexNameByKey
Returns the index name for a key. The name is always the current index name, but in cases where the index supports key-based sharding.- Parameters:
key- the index key.- Returns:
- The index name involved
-
acquireAtomicExclusiveLock
Acquires exclusive lock in the active atomic operation running on the current thread for this index.If this index 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.- 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.
-
size
long size()- Returns:
- number of entries in the index.
-
getRids
-
stream
-
descStream
-
keyStream
-
streamEntriesBetween
Stream<ORawPair<Object,ORID>> streamEntriesBetween(Object fromKey, boolean fromInclusive, Object toKey, boolean toInclusive, boolean ascOrder) Returns 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.
-
streamEntries
Returns 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.
-
streamEntriesMajor
Stream<ORawPair<Object,ORID>> 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.- 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
Stream<ORawPair<Object,ORID>> 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.- 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.
-
securityFilterOnRead
-
isLabelSecurityDefined
static boolean isLabelSecurityDefined(ODatabaseDocumentInternal database, OSecurityInternal security, String indexClass, String propertyName) -
isReadRestrictedBySecurityPolicy
static boolean isReadRestrictedBySecurityPolicy(String indexClass, ODatabaseDocumentInternal db, OSecurityInternal security) -
securityFilterOnRead
-
isNativeTxSupported
boolean isNativeTxSupported() -
interpretTxKeyChanges
Iterable<OStorageTransactionIndexChange> interpretTxKeyChanges(OTransactionIndexChangesPerKey changes) -
getRidsIgnoreTx
-
create
-
getIndexId
int getIndexId()
-