
public interface OIndexManager
| 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 indexDefinition,
int[] clusterIdsToIndex,
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.
|
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.
|
OIndexManager |
load()
Load index manager data from database.
|
void |
recreateIndexes()
Drops all indexes and creates them from scratch.
|
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.
|
OIndexManager load()
void create()
void recreateIndexes()
Collection<? extends OIndex<?>> getIndexes()
OIndex<?> getIndex(String iName)
iName - name of indexOIndex<?> getClassAutoShardingIndex(String className)
className - Class nameboolean existsIndex(String iName)
iName - name of index.OIndex<?> createIndex(String iName, String iType, OIndexDefinition indexDefinition, int[] clusterIdsToIndex, OProgressListener progressListener, ODocument metadata)
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.OIndex<?> createIndex(String iName, String iType, OIndexDefinition indexDefinition, int[] clusterIdsToIndex, OProgressListener progressListener, ODocument metadata, String algorithm)
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 useOIndexManager dropIndex(String iIndexName)
iIndexName - the name of index to dropString getDefaultClusterName()
void setDefaultClusterName(String defaultClusterName)
defaultClusterName - name of new default clusterODictionary<ORecord> getDictionary()
void flush()
ODocument getConfiguration()
Set<OIndex<?>> getClassInvolvedIndexes(String className, Collection<String> fields)
className - name of class which is indexed.fields - Field names.Set<OIndex<?>> getClassInvolvedIndexes(String className, String... fields)
className - name of class which is indexed.fields - Field names.boolean areIndexed(String className, Collection<String> fields)
className - name of class which contain fields.fields - Field names.true if given fields are contained as first key fields in class indexes.boolean areIndexed(String className, String... fields)
className - name of class which contain fields.fields - Field names.true if given fields are contained as first key fields in class indexes.areIndexed(String, java.util.Collection)Set<OIndex<?>> getClassIndexes(String className)
className - name of class which is indexed.void getClassIndexes(String className, Collection<OIndex<?>> indexes)
className - name of class which is indexed.indexes - Collection of indexes where to add all the indexesOIndexUnique getClassUniqueIndex(String className)
OIndex<?> getClassIndex(String className, String indexName)
className - name of class which is indexed.indexName - name of index.void waitTillIndexRestore()
boolean autoRecreateIndexesAfterCrash()
void addClusterToIndex(String clusterName, String indexName)
clusterName - cluster to add.indexName - name of index.void removeClusterFromIndex(String clusterName, String indexName)
clusterName - cluster to remove.indexName - name of index.<RET extends ODocumentWrapper> RET save()
void removeClassPropertyIndex(OIndex<?> idx)
idx - index to remove.Copyright © 2009–2025 OrientDB. All rights reserved.