
public class OIndexManagerProxy extends OProxedResource<OIndexManagerAbstract> implements OIndexManager
database, delegate| Constructor and Description |
|---|
OIndexManagerProxy(OIndexManagerAbstract iDelegate,
ODatabaseDocumentInternal iDatabase) |
| Modifier and Type | Method and Description |
|---|---|
void |
addClusterToIndex(String clusterName,
String indexName)
Adds a cluster to tracked cluster list of specified index.
|
boolean |
areIndexed(String className,
Collection<String> fields)
Indicates whether given fields are contained as first key fields in class indexes.
|
boolean |
areIndexed(String className,
String... fields) |
boolean |
autoRecreateIndexesAfterCrash()
Checks if indexes should be automatically recreated.
|
void |
create()
Creates a document where index manager configuration is saved and creates a "dictionary" index.
|
OIndex<?> |
createIndex(String iName,
String iType,
OIndexDefinition indexDefinition,
int[] clusterIdsToIndex,
OProgressListener progressListener,
ODocument metadata)
Creates a new index with default algorithm.
|
OIndex<?> |
createIndex(String iName,
String iType,
OIndexDefinition iIndexDefinition,
int[] iClusterIdsToIndex,
OProgressListener progressListener,
ODocument metadata,
String algorithm)
Creates a new index.
|
OIndexManager |
dropIndex(String iIndexName)
Drop index with specified name.
|
boolean |
existsIndex(String iName)
Checks if index with specified name exists in database.
|
void |
flush()
Flushes all indexes that is registered in this manager.
|
OIndex<?> |
getClassAutoShardingIndex(String className)
Returns the auto-sharding index defined for the class, if any.
|
OIndex<?> |
getClassIndex(String className,
String indexName)
Searches for index for a specified class with specified name.
|
Set<OIndex<?>> |
getClassIndexes(String className)
Gets indexes for a specified class (excluding indexes for sub-classes).
|
void |
getClassIndexes(String className,
Collection<OIndex<?>> indexes)
Gets indexes for a specified class (excluding indexes for sub-classes).
|
Set<OIndex<?>> |
getClassInvolvedIndexes(String className,
Collection<String> fields)
Returns list of indexes that contain passed in fields names as their first keys.
|
Set<OIndex<?>> |
getClassInvolvedIndexes(String className,
String... fields)
Returns list of indexes that contain passed in fields names as their first keys.
|
void |
getClassRawIndexes(String name,
Collection<OIndex<?>> indexes) |
OIndexUnique |
getClassUniqueIndex(String className)
Returns the unique index for a class, if any.
|
ODocument |
getConfiguration()
Returns a record where configurations are saved.
|
String |
getDefaultClusterName()
IMPORTANT! Only for internal usage.
|
ODictionary<ORecord> |
getDictionary()
Return a dictionary index.
|
OIndex<?> |
getIndex(String iName)
Index by specified name.
|
Collection<? extends OIndex<?>> |
getIndexes()
Returns all indexes registered in database.
|
void |
load()
Load index manager data from database.
|
void |
recreateIndexes()
Drops all indexes and creates them from scratch.
|
OIndexManagerProxy |
reload()
Force reloading of indexes.
|
void |
removeClassPropertyIndex(OIndex<?> idx)
Removes index from class-property map.
|
void |
removeClusterFromIndex(String clusterName,
String indexName)
Removes a cluster from tracked cluster list of specified index.
|
<RET extends ODocumentWrapper> |
save()
Saves index manager data.
|
void |
setDefaultClusterName(String defaultClusterName)
Sets the new default cluster.
|
void |
waitTillIndexRestore()
Blocks current thread till indexes will be restored.
|
public OIndexManagerProxy(OIndexManagerAbstract iDelegate, ODatabaseDocumentInternal iDatabase)
public void load()
OIndexManagerIMPORTANT! Only for internal usage.
load in interface OIndexManagerpublic OIndexManagerProxy reload()
reload in interface OIndexManagerpublic void create()
OIndexManagerIMPORTANT! Only for internal usage.
create in interface OIndexManagerpublic Collection<? extends OIndex<?>> getIndexes()
OIndexManagergetIndexes in interface OIndexManagerpublic OIndex<?> getIndex(String iName)
OIndexManagergetIndex in interface OIndexManageriName - name of indexpublic boolean existsIndex(String iName)
OIndexManagerexistsIndex in interface OIndexManageriName - name of index.public OIndex<?> createIndex(String iName, String iType, OIndexDefinition indexDefinition, int[] clusterIdsToIndex, OProgressListener progressListener, ODocument metadata)
OIndexManagercreateIndex in interface OIndexManageriName - - name of indexiType - - index type. Specified by plugged index factories.indexDefinition - metadata that describes index structureclusterIdsToIndex - ids of clusters that index should track for changes.progressListener - listener to track task progress.metadata - document with additional properties that can be used by index engine.public OIndex<?> createIndex(String iName, String iType, OIndexDefinition iIndexDefinition, int[] iClusterIdsToIndex, OProgressListener progressListener, ODocument metadata, String algorithm)
OIndexManagerMay require quite a long time if big amount of data should be indexed.
createIndex in interface OIndexManageriName - name of indexiType - index type. Specified by plugged index factories.iIndexDefinition - metadata that describes index structureiClusterIdsToIndex - ids of clusters that index should track for changes.progressListener - listener to track task progress.metadata - document with additional properties that can be used by index engine.algorithm - tip to an index factory what algorithm to usepublic ODocument getConfiguration()
OIndexManagerIMPORTANT! Only for internal usage.
getConfiguration in interface OIndexManagerpublic OIndexManager dropIndex(String iIndexName)
OIndexManagerdropIndex in interface OIndexManageriIndexName - the name of index to droppublic String getDefaultClusterName()
OIndexManagergetDefaultClusterName in interface OIndexManagerpublic void setDefaultClusterName(String defaultClusterName)
OIndexManagerIMPORTANT! Only for internal usage.
setDefaultClusterName in interface OIndexManagerdefaultClusterName - name of new default clusterpublic ODictionary<ORecord> getDictionary()
OIndexManagergetDictionary in interface OIndexManagerpublic void flush()
OIndexManagerflush in interface OIndexManagerpublic Set<OIndex<?>> getClassInvolvedIndexes(String className, Collection<String> fields)
OIndexManagergetClassInvolvedIndexes in interface OIndexManagerclassName - name of class which is indexed.fields - Field names.public Set<OIndex<?>> getClassInvolvedIndexes(String className, String... fields)
OIndexManagergetClassInvolvedIndexes in interface OIndexManagerclassName - name of class which is indexed.fields - Field names.public boolean areIndexed(String className, Collection<String> fields)
OIndexManagerareIndexed in interface OIndexManagerclassName - name of class which contain fields.fields - Field names.true if given fields are contained as first key fields in class indexes.public boolean areIndexed(String className, String... fields)
areIndexed in interface OIndexManagerclassName - name of class which contain fields.fields - Field names.true if given fields are contained as first key fields in class indexes.OIndexManager.areIndexed(String, java.util.Collection)public Set<OIndex<?>> getClassIndexes(String className)
OIndexManagergetClassIndexes in interface OIndexManagerclassName - name of class which is indexed.public void getClassIndexes(String className, Collection<OIndex<?>> indexes)
OIndexManagergetClassIndexes in interface OIndexManagerclassName - name of class which is indexed.indexes - Collection of indexes where to add all the indexespublic OIndex<?> getClassIndex(String className, String indexName)
OIndexManagergetClassIndex in interface OIndexManagerclassName - name of class which is indexed.indexName - name of index.public OIndexUnique getClassUniqueIndex(String className)
OIndexManagergetClassUniqueIndex in interface OIndexManagerpublic OIndex<?> getClassAutoShardingIndex(String className)
OIndexManagergetClassAutoShardingIndex in interface OIndexManagerclassName - Class namepublic void recreateIndexes()
OIndexManagerrecreateIndexes in interface OIndexManagerpublic void waitTillIndexRestore()
OIndexManagerwaitTillIndexRestore in interface OIndexManagerpublic boolean autoRecreateIndexesAfterCrash()
OIndexManagerIMPORTANT! Only for internal usage.
autoRecreateIndexesAfterCrash in interface OIndexManagerpublic void addClusterToIndex(String clusterName, String indexName)
OIndexManagerIMPORTANT! Only for internal usage.
addClusterToIndex in interface OIndexManagerclusterName - cluster to add.indexName - name of index.public void removeClusterFromIndex(String clusterName, String indexName)
OIndexManagerIMPORTANT! Only for internal usage.
removeClusterFromIndex in interface OIndexManagerclusterName - cluster to remove.indexName - name of index.public <RET extends ODocumentWrapper> RET save()
OIndexManagerIMPORTANT! Only for internal usage.
save in interface OIndexManagerpublic void removeClassPropertyIndex(OIndex<?> idx)
OIndexManagerIMPORTANT! Only for internal usage.
removeClassPropertyIndex in interface OIndexManageridx - index to remove.public void getClassRawIndexes(String name, Collection<OIndex<?>> indexes)
Copyright © 2009–2025 OrientDB. All rights reserved.