public interface OIndexManager
Modifier and Type | Method and Description |
---|---|
void |
addClusterToIndex(String clusterName,
String indexName)
Deprecated.
|
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()
Deprecated.
|
void |
create()
Deprecated.
|
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()
Deprecated.
|
String |
getDefaultClusterName()
Deprecated.
|
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()
Deprecated.
|
void |
recreateIndexes()
Drops all indexes and creates them from scratch.
|
OIndexManager |
reload() |
void |
removeClassPropertyIndex(OIndex<?> idx)
Deprecated.
|
void |
removeClusterFromIndex(String clusterName,
String indexName)
Deprecated.
|
<RET extends ODocumentWrapper> |
save()
Deprecated.
|
void |
setDefaultClusterName(String defaultClusterName)
Deprecated.
|
void |
waitTillIndexRestore()
Blocks current thread till indexes will be restored.
|
@Deprecated void load()
IMPORTANT! Only for internal usage.
@Deprecated void create()
IMPORTANT! Only for internal usage.
OIndexManager reload()
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)
May require quite a long time if big amount of data should be indexed.
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 drop@Deprecated String getDefaultClusterName()
@Deprecated void setDefaultClusterName(String defaultClusterName)
IMPORTANT! Only for internal usage.
defaultClusterName
- name of new default clusterODictionary<ORecord> getDictionary()
void flush()
@Deprecated ODocument getConfiguration()
IMPORTANT! Only for internal usage.
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()
@Deprecated boolean autoRecreateIndexesAfterCrash()
IMPORTANT! Only for internal usage.
@Deprecated void addClusterToIndex(String clusterName, String indexName)
IMPORTANT! Only for internal usage.
clusterName
- cluster to add.indexName
- name of index.@Deprecated void removeClusterFromIndex(String clusterName, String indexName)
IMPORTANT! Only for internal usage.
clusterName
- cluster to remove.indexName
- name of index.@Deprecated <RET extends ODocumentWrapper> RET save()
IMPORTANT! Only for internal usage.
@Deprecated void removeClassPropertyIndex(OIndex<?> idx)
IMPORTANT! Only for internal usage.
idx
- index to remove.Copyright © 2009–2020 OrientDB. All rights reserved.