Interface OIndexManager
- All Known Implementing Classes:
OSessionIndexManager
public interface OIndexManager
Manager of indexes.
- Author:
- Luca Garulli (l.garulli--(at)--orientdb.com)
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddClusterToIndex(String clusterName, String indexName) Adds a cluster to tracked cluster list of specified index.booleanareIndexed(String className, String... fields) Deprecated.Manual indexes are deprecated and will be removedbooleanareIndexed(String className, Collection<String> fields) Deprecated.booleanDeprecated.createIndex(String iName, String iType, OIndexDefinition indexDefinition, int[] clusterIdsToIndex, OProgressListener progressListener, ODocument metadata) Deprecated.Manual indexes are deprecated and will be removedcreateIndex(String iName, String iType, OIndexDefinition indexDefinition, int[] clusterIdsToIndex, OProgressListener progressListener, ODocument metadata, String algorithm) Deprecated.Manual indexes are deprecated and will be removedDeprecated.Manual indexes are deprecated and will be removedbooleanexistsIndex(String iName) Deprecated.Manual indexes are deprecated and will be removedgetClassAutoShardingIndex(String className) Deprecated.Manual indexes are deprecated and will be removedgetClassIndex(String className, String indexName) Deprecated.Manual indexes are deprecated and will be removedgetClassIndexes(String className) Deprecated.Manual indexes are deprecated and will be removedvoidgetClassIndexes(String className, Collection<OIndex> indexes) Deprecated.Manual indexes are deprecated and will be removedgetClassInvolvedIndexes(String className, String... fields) Deprecated.Manual indexes are deprecated and will be removedgetClassInvolvedIndexes(String className, Collection<String> fields) Deprecated.Manual indexes are deprecated and will be removedgetClassUniqueIndex(String className) Deprecated.Manual indexes are deprecated and will be removedDeprecated.Deprecated.Deprecated.Manual indexes are deprecated and will be removedIndex by specified name.Collection<? extends OIndex>Deprecated.Manual indexes are deprecated and will be removedvoidDeprecated.Manual indexes are deprecated and will be removedvoidDeprecated.voidremoveClusterFromIndex(String clusterName, String indexName) Removes a cluster from tracked cluster list of specified index.voidsetDefaultClusterName(String defaultClusterName) Deprecated.voidDeprecated.Manual indexes are deprecated and will be removed
-
Method Details
-
recreateIndexes
Deprecated.Manual indexes are deprecated and will be removedDrops all indexes and creates them from scratch. -
getIndexes
Deprecated.Manual indexes are deprecated and will be removedReturns all indexes registered in database.- Returns:
- list of registered indexes.
-
getIndex
Index by specified name.- Parameters:
iName- name of index- Returns:
- index if one registered in database or null otherwise.
-
getClassAutoShardingIndex
Deprecated.Manual indexes are deprecated and will be removedReturns the auto-sharding index defined for the class, if any.- Parameters:
className- Class name
-
existsIndex
Deprecated.Manual indexes are deprecated and will be removedChecks if index with specified name exists in database.- Parameters:
iName- name of index.- Returns:
- true if index with specified name exists, false otherwise.
-
createIndex
@Deprecated OIndex createIndex(String iName, String iType, OIndexDefinition indexDefinition, int[] clusterIdsToIndex, OProgressListener progressListener, ODocument metadata) Deprecated.Manual indexes are deprecated and will be removedCreates a new index with default algorithm.- Parameters:
iName- - 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.- Returns:
- a newly created index instance
-
createIndex
@Deprecated OIndex createIndex(String iName, String iType, OIndexDefinition indexDefinition, int[] clusterIdsToIndex, OProgressListener progressListener, ODocument metadata, String algorithm) Deprecated.Manual indexes are deprecated and will be removedCreates a new index.May require quite a long time if big amount of data should be indexed.
- Parameters:
iName- 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.algorithm- tip to an index factory what algorithm to use- Returns:
- a newly created index instance
-
dropIndex
Deprecated.Manual indexes are deprecated and will be removedDrop index with specified name. Do nothing if such index does not exists.- Parameters:
iIndexName- the name of index to drop- Returns:
- this
-
getDefaultClusterName
Deprecated.IMPORTANT! Only for internal usage.- Returns:
- name of default cluster.
-
setDefaultClusterName
Deprecated.Sets the new default cluster.IMPORTANT! Only for internal usage.
- Parameters:
defaultClusterName- name of new default cluster
-
getDictionary
Deprecated.Manual indexes are deprecated and will be removedReturn a dictionary index. Could be helpful to store different kinds of configurations.- Returns:
- a dictionary
-
getConfiguration
Deprecated.Returns a record where configurations are saved.IMPORTANT! Only for internal usage.
- Returns:
- a document that used to store index configurations.
-
getClassInvolvedIndexes
Deprecated.Manual indexes are deprecated and will be removedReturns list of indexes that contain passed in fields names as their first keys. Order of fields does not matter.All indexes sorted by their count of parameters in ascending order. If there are indexes for the given set of fields in super class they will be taken into account.
- Parameters:
className- name of class which is indexed.fields- Field names.- Returns:
- list of indexes that contain passed in fields names as their first keys.
-
getClassInvolvedIndexes
Deprecated.Manual indexes are deprecated and will be removedReturns list of indexes that contain passed in fields names as their first keys. Order of fields does not matter.All indexes sorted by their count of parameters in ascending order. If there are indexes for the given set of fields in super class they will be taken into account.
- Parameters:
className- name of class which is indexed.fields- Field names.- Returns:
- list of indexes that contain passed in fields names as their first keys.
-
areIndexed
Deprecated.Indicates whether given fields are contained as first key fields in class indexes. Order of fields does not matter. If there are indexes for the given set of fields in super class they will be taken into account.- Parameters:
className- name of class which containfields.fields- Field names.- Returns:
trueif given fields are contained as first key fields in class indexes.
-
areIndexed
Deprecated.Manual indexes are deprecated and will be removed- Parameters:
className- name of class which containfields.fields- Field names.- Returns:
trueif given fields are contained as first key fields in class indexes.- See Also:
-
getClassIndexes
Deprecated.Manual indexes are deprecated and will be removedGets indexes for a specified class (excluding indexes for sub-classes).- Parameters:
className- name of class which is indexed.- Returns:
- a set of indexes related to specified class
-
getClassIndexes
Deprecated.Manual indexes are deprecated and will be removedGets indexes for a specified class (excluding indexes for sub-classes).- Parameters:
className- name of class which is indexed.indexes- Collection of indexes where to add all the indexes
-
getClassUniqueIndex
Deprecated.Manual indexes are deprecated and will be removedReturns the unique index for a class, if any. -
getClassIndex
Deprecated.Manual indexes are deprecated and will be removedSearches for index for a specified class with specified name.- Parameters:
className- name of class which is indexed.indexName- name of index.- Returns:
- an index instance or null if such does not exist.
-
waitTillIndexRestore
Deprecated.Manual indexes are deprecated and will be removedBlocks current thread till indexes will be restored. -
autoRecreateIndexesAfterCrash
Deprecated.Checks if indexes should be automatically recreated.IMPORTANT! Only for internal usage.
- Returns:
- true if crash is happened and database configured to automatically recreate indexes after crash.
-
addClusterToIndex
Adds a cluster to tracked cluster list of specified index.IMPORTANT! Only for internal usage.
- Parameters:
clusterName- cluster to add.indexName- name of index.
-
removeClusterFromIndex
Removes a cluster from tracked cluster list of specified index.IMPORTANT! Only for internal usage.
- Parameters:
clusterName- cluster to remove.indexName- name of index.
-
removeClassPropertyIndex
Deprecated.Removes index from class-property map.IMPORTANT! Only for internal usage.
- Parameters:
idx- index to remove.
-