
public class OIndexAbstractDelegate extends Object implements OIndexInternal
| Modifier and Type | Field and Description |
|---|---|
protected OIndexInternal |
delegate |
ALGORITHM, CONFIG_AUTOMATIC, CONFIG_KEYTYPE, CONFIG_NAME, CONFIG_TYPE, INDEX_DEFINITION, INDEX_DEFINITION_CLASS, INDEX_VERSION, METADATA, VALUE_CONTAINER_ALGORITHMMERGE_KEYS| Constructor and Description |
|---|
OIndexAbstractDelegate(OIndexInternal internal) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
acquireAtomicExclusiveLock(Object key)
Acquires exclusive lock in the active atomic operation running on the current thread for this
index.
|
OIndex |
addCluster(String clusterName)
Add given cluster to the list of clusters that should be automatically indexed.
|
void |
addTxOperation(OIndexAbstract.IndexTxSnapshot snapshots,
OTransactionIndexChanges changes) |
boolean |
canBeUsedInEqualityOperators()
Indicates whether given index can be used to calculate result of
OQueryOperatorEquality operators. |
protected void |
checkForKeyType(Object iKey) |
OIndex |
clear()
Deprecated.
|
void |
close() |
void |
commit(OIndexAbstract.IndexTxSnapshot snapshots) |
int |
compareTo(OIndex o) |
long |
count(Object key)
Deprecated.
|
OIndex |
create(String name,
OIndexDefinition indexDefinition,
String clusterIndexName,
Set<String> clustersToIndex,
boolean rebuild,
OProgressListener progressListener) |
OIndexCursor |
cursor()
Deprecated.
|
OIndex |
delete()
Delete the index.
|
OIndexCursor |
descCursor()
Deprecated.
|
Stream<ORawPair<Object,ORID>> |
descStream() |
void |
doPut(OAbstractPaginatedStorage storage,
Object key,
ORID rid) |
boolean |
doRemove(OAbstractPaginatedStorage storage,
Object key) |
boolean |
doRemove(OAbstractPaginatedStorage storage,
Object key,
ORID rid) |
boolean |
equals(Object o) |
void |
flush()
Deprecated.
|
Object |
get(Object key)
Deprecated.
|
String |
getAlgorithm()
Returns the engine of the index as string.
|
Set<String> |
getClusters()
Returns Names of clusters that will be indexed.
|
Object |
getCollatingValue(Object key) |
ODocument |
getConfiguration()
Returns the index configuration.
|
String |
getDatabaseName() |
OIndexDefinition |
getDefinition() |
Object |
getFirstKey()
Deprecated.
|
int |
getIndexId() |
String |
getIndexNameByKey(Object key)
Returns the index name for a key.
|
OIndexInternal |
getInternal()
Returns the internal index used.
|
long |
getKeySize()
Deprecated.
|
OType[] |
getKeyTypes()
Types of the keys that index can accept, if index contains composite key, list of types of
elements from which this index consist will be returned, otherwise single element (key type
obviously) will be returned.
|
Object |
getLastKey()
Deprecated.
|
ODocument |
getMetadata() |
String |
getName()
Returns the index name.
|
long |
getRebuildVersion()
Deprecated.
|
Stream<ORID> |
getRids(Object key) |
long |
getSize()
Deprecated.
|
String |
getType()
Returns the type of the index as string.
|
int |
getVersion()
Returns binary format version for this index.
|
int |
hashCode() |
boolean |
hasRangeQuerySupport() |
Iterable<OTransactionIndexChangesPerKey.OTransactionIndexEntry> |
interpretTxKeyChanges(OTransactionIndexChangesPerKey changes) |
boolean |
isAutomatic()
Tells if the index is automatic.
|
boolean |
isNativeTxSupported() |
boolean |
isRebuilding()
Deprecated.
|
boolean |
isUnique() |
OIndexCursor |
iterateEntries(Collection<?> keys,
boolean ascSortOrder)
Deprecated.
|
OIndexCursor |
iterateEntriesBetween(Object fromKey,
boolean fromInclusive,
Object toKey,
boolean toInclusive,
boolean ascOrder)
Deprecated.
|
OIndexCursor |
iterateEntriesMajor(Object fromKey,
boolean fromInclusive,
boolean ascOrder)
Deprecated.
|
OIndexCursor |
iterateEntriesMinor(Object toKey,
boolean toInclusive,
boolean ascOrder)
Deprecated.
|
OIndexKeyCursor |
keyCursor()
Deprecated.
|
Stream<Object> |
keyStream() |
boolean |
loadFromConfiguration(ODocument config)
Loads the index giving the configuration.
|
OIndexMetadata |
loadMetadata(ODocument config) |
void |
postCommit(OIndexAbstract.IndexTxSnapshot snapshots) |
void |
preCommit(OIndexAbstract.IndexTxSnapshot snapshots) |
OIndex |
put(Object key,
OIdentifiable value)
Inserts a new entry in the index.
|
long |
rebuild()
Rebuilds an automatic index.
|
long |
rebuild(OProgressListener iProgressListener)
Populate the index with all the existent records.
|
boolean |
remove(Object key)
Removes an entry by its key.
|
boolean |
remove(Object key,
OIdentifiable rid)
Removes an entry by its key and value.
|
OIndex |
removeCluster(String clusterName)
Remove given cluster from the list of clusters that should be automatically indexed.
|
void |
setType(OType type) |
long |
size() |
Stream<ORawPair<Object,ORID>> |
stream() |
Stream<ORawPair<Object,ORID>> |
streamEntries(Collection<?> keys,
boolean ascSortOrder)
Returns stream which presents data associated with passed in keys.
|
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.
|
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.
|
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.
|
boolean |
supportsOrderedIterations() |
String |
toString() |
ODocument |
updateConfiguration()
Saves the index configuration to disk.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, waitisLabelSecurityDefined, isReadRestrictedBySecurityPolicy, securityFilterOnRead, securityFilterOnReadprotected OIndexInternal delegate
public OIndexAbstractDelegate(OIndexInternal internal)
public OIndexInternal getInternal()
OIndexgetInternal in interface OIndexpublic OIndex create(String name, OIndexDefinition indexDefinition, String clusterIndexName, Set<String> clustersToIndex, boolean rebuild, OProgressListener progressListener)
@Deprecated public Object get(Object key)
OIndexpublic Stream<ORID> getRids(Object key)
getRids in interface OIndexInternalpublic OIndex put(Object key, OIdentifiable value)
OIndexpublic int getVersion()
OIndexgetVersion in interface OIndexpublic boolean remove(Object key)
OIndexpublic boolean remove(Object key, OIdentifiable rid)
OIndex@Deprecated public OIndex clear()
protected void checkForKeyType(Object iKey)
@Deprecated public long getSize()
@Deprecated public long count(Object key)
OIndex@Deprecated public long getKeySize()
getKeySize in interface OIndex@Deprecated public void flush()
OIndex@Deprecated public long getRebuildVersion()
getRebuildVersion in interface OIndex@Deprecated public boolean isRebuilding()
isRebuilding in interface OIndexOIndex.getRebuildVersion()@Deprecated public Object getFirstKey()
getFirstKey in interface OIndex@Deprecated public Object getLastKey()
getLastKey in interface OIndex@Deprecated public OIndexCursor cursor()
@Deprecated public OIndexCursor descCursor()
descCursor in interface OIndex@Deprecated public OIndexKeyCursor keyCursor()
@Deprecated public OIndexCursor iterateEntries(Collection<?> keys, boolean ascSortOrder)
OIndexiterateEntries in interface OIndexkeys - Keys data of which should be returned.ascSortOrder - Flag which determines whether data iterated by cursor should be in
ascending or descending order.@Deprecated public OIndexCursor iterateEntriesBetween(Object fromKey, boolean fromInclusive, Object toKey, boolean toInclusive, boolean ascOrder)
OIndexiterateEntriesBetween in interface OIndexfromKey - 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 cursor should be in ascending or
descending order.@Deprecated public OIndexCursor iterateEntriesMajor(Object fromKey, boolean fromInclusive, boolean ascOrder)
OIndexiterateEntriesMajor in interface OIndexfromKey - Lower border of index data.fromInclusive - Indicates whether lower border should be inclusive or exclusive.ascOrder - Flag which determines whether data iterated by cursor should be in ascending or
descending order.@Deprecated public OIndexCursor iterateEntriesMinor(Object toKey, boolean toInclusive, boolean ascOrder)
OIndexiterateEntriesMinor in interface OIndextoKey - Upper border of index data.toInclusive - Indicates Indicates whether upper border should be inclusive or exclusive.ascOrder - Flag which determines whether data iterated by cursor should be in ascending or
descending order.public String getType()
OIndexpublic String getAlgorithm()
OIndexgetAlgorithm in interface OIndexpublic boolean isAutomatic()
OIndexisAutomatic in interface OIndexpublic ODocument getConfiguration()
OIndexgetConfiguration in interface OIndexpublic ODocument getMetadata()
getMetadata in interface OIndexpublic long rebuild()
OIndexpublic long rebuild(OProgressListener iProgressListener)
OIndexpublic OType[] getKeyTypes()
OIndexgetKeyTypes in interface OIndexpublic OIndexDefinition getDefinition()
getDefinition in interface OIndexpublic Set<String> getClusters()
OIndexgetClusters in interface OIndexpublic String getDatabaseName()
getDatabaseName in interface OIndexpublic boolean supportsOrderedIterations()
supportsOrderedIterations in interface OIndexpublic int getIndexId()
getIndexId in interface OIndexpublic int compareTo(OIndex o)
compareTo in interface Comparable<OIndex>public Object getCollatingValue(Object key)
getCollatingValue in interface OIndexInternalpublic boolean loadFromConfiguration(ODocument config)
OIndexInternalloadFromConfiguration in interface OIndexInternalconfig - ODocument instance containing the configurationpublic ODocument updateConfiguration()
OIndexInternalupdateConfiguration in interface OIndexInternalOIndex.getConfiguration()public OIndex addCluster(String clusterName)
OIndexInternaladdCluster in interface OIndexInternalclusterName - Cluster to add.public OIndex removeCluster(String clusterName)
OIndexInternalremoveCluster in interface OIndexInternalclusterName - Cluster to remove.public boolean canBeUsedInEqualityOperators()
OIndexInternalOQueryOperatorEquality operators.canBeUsedInEqualityOperators in interface OIndexInternaltrue if given index can be used to calculate result of OQueryOperatorEquality operators.public boolean hasRangeQuerySupport()
hasRangeQuerySupport in interface OIndexInternalpublic OIndexMetadata loadMetadata(ODocument config)
loadMetadata in interface OIndexInternalpublic void close()
close in interface OIndexInternalpublic void preCommit(OIndexAbstract.IndexTxSnapshot snapshots)
preCommit in interface OIndexInternalpublic void addTxOperation(OIndexAbstract.IndexTxSnapshot snapshots, OTransactionIndexChanges changes)
addTxOperation in interface OIndexInternalpublic void commit(OIndexAbstract.IndexTxSnapshot snapshots)
commit in interface OIndexInternalpublic void postCommit(OIndexAbstract.IndexTxSnapshot snapshots)
postCommit in interface OIndexInternalpublic void setType(OType type)
setType in interface OIndexInternalpublic String getIndexNameByKey(Object key)
OIndexInternalgetIndexNameByKey in interface OIndexInternalkey - the index key.public boolean acquireAtomicExclusiveLock(Object key)
OIndexInternalIf this index supports a more narrow locking, for example key-based sharding, it may use the
provided key to infer a more narrow lock scope, but that is not a requirement.
acquireAtomicExclusiveLock in interface OIndexInternalkey - the index key to lock.true if this index was locked entirely, false if this index locking is
sensitive to the provided key and only some subset of this index was locked.public long size()
size in interface OIndexInternalpublic Stream<ORawPair<Object,ORID>> stream()
stream in interface OIndexInternalpublic Stream<ORawPair<Object,ORID>> descStream()
descStream in interface OIndexInternalpublic Stream<Object> keyStream()
keyStream in interface OIndexInternalpublic Stream<ORawPair<Object,ORID>> streamEntriesBetween(Object fromKey, boolean fromInclusive, Object toKey, boolean toInclusive, boolean ascOrder)
OIndexInternalstreamEntriesBetween in interface OIndexInternalfromKey - 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.public Stream<ORawPair<Object,ORID>> streamEntries(Collection<?> keys, boolean ascSortOrder)
OIndexInternalstreamEntries in interface OIndexInternalkeys - Keys data of which should be returned.ascSortOrder - Flag which determines whether data iterated by stream should be in
ascending or descending order.public Stream<ORawPair<Object,ORID>> streamEntriesMajor(Object fromKey, boolean fromInclusive, boolean ascOrder)
OIndexInternalstreamEntriesMajor in interface OIndexInternalfromKey - 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.public Stream<ORawPair<Object,ORID>> streamEntriesMinor(Object toKey, boolean toInclusive, boolean ascOrder)
OIndexInternalstreamEntriesMinor in interface OIndexInternaltoKey - 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.public boolean isNativeTxSupported()
isNativeTxSupported in interface OIndexInternalpublic Iterable<OTransactionIndexChangesPerKey.OTransactionIndexEntry> interpretTxKeyChanges(OTransactionIndexChangesPerKey changes)
interpretTxKeyChanges in interface OIndexInternalpublic void doPut(OAbstractPaginatedStorage storage, Object key, ORID rid) throws OInvalidIndexEngineIdException
doPut in interface OIndexInternalOInvalidIndexEngineIdExceptionpublic boolean doRemove(OAbstractPaginatedStorage storage, Object key, ORID rid) throws OInvalidIndexEngineIdException
doRemove in interface OIndexInternalOInvalidIndexEngineIdExceptionpublic boolean doRemove(OAbstractPaginatedStorage storage, Object key) throws OInvalidIndexEngineIdException
doRemove in interface OIndexInternalOInvalidIndexEngineIdExceptionCopyright © 2009–2025 OrientDB. All rights reserved.