
public abstract class OIndexManagerAbstract extends ODocumentWrapperNoClass implements OIndexManager, OCloseable
| Modifier and Type | Field and Description |
|---|---|
protected Map<String,Map<OMultiKey,Set<OIndex<?>>>> |
classPropertyIndex |
static String |
CONFIG_INDEXES |
protected String |
defaultClusterName |
static String |
DICTIONARY_NAME |
protected Map<String,OIndex<?>> |
indexes |
protected ReadWriteLock |
lock |
protected String |
manualClusterName |
document| Constructor and Description |
|---|
OIndexManagerAbstract(ODatabaseDocument iDatabase) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
acquireExclusiveLock() |
protected void |
acquireSharedLock() |
void |
addClusterToIndex(String clusterName,
String indexName)
Adds a cluster to tracked cluster list of specified index.
|
protected void |
addIndexInternal(OIndex<?> 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) |
protected void |
clearMetadata() |
void |
close()
Closes resources inside of call of OStorage#close().
|
protected static Map<OMultiKey,Set<OIndex<?>>> |
copyPropertyMap(Map<OMultiKey,Set<OIndex<?>>> original) |
void |
create()
Creates a document where index manager configuration is saved and creates a "dictionary" index.
|
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.
|
protected static ODatabaseDocumentInternal |
getDatabase() |
protected ODatabaseDocumentInternal |
getDatabaseIfDefined() |
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.
|
protected Locale |
getServerLocale() |
OIndexManagerAbstract |
load()
Load index manager data from database.
|
protected List<String> |
normalizeFieldNames(Collection<String> fieldNames) |
protected abstract OIndex<?> |
preProcessBeforeReturn(OIndex<?> index) |
protected void |
releaseExclusiveLock() |
protected void |
releaseSharedLock() |
<RET extends ODocumentWrapper> |
reload() |
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.
|
OIndexManager |
setDirty() |
fromStream, fromStream, load, reload, saveequals, getDocument, hashCode, load, load, reload, toStream, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitautoRecreateIndexesAfterCrash, createIndex, createIndex, dropIndex, recreateIndexes, removeClassPropertyIndex, waitTillIndexRestorepublic static final String CONFIG_INDEXES
public static final String DICTIONARY_NAME
protected String defaultClusterName
protected String manualClusterName
protected ReadWriteLock lock
public OIndexManagerAbstract(ODatabaseDocument iDatabase)
public OIndexManagerAbstract load()
OIndexManagerload in interface OIndexManagerload in class ODocumentWrapperNoClasspublic <RET extends ODocumentWrapper> RET reload()
reload in class ODocumentWrapperNoClasspublic <RET extends ODocumentWrapper> RET save()
OIndexManagersave in interface OIndexManagersave in class ODocumentWrapperNoClasspublic void create()
OIndexManagercreate in interface OIndexManagerpublic void flush()
OIndexManagerflush in interface OIndexManagerpublic Collection<? extends OIndex<?>> getIndexes()
OIndexManagergetIndexes in interface OIndexManagerpublic OIndex<?> getIndex(String iName)
OIndexManagergetIndex in interface OIndexManageriName - name of indexpublic void addClusterToIndex(String clusterName, String indexName)
OIndexManageraddClusterToIndex in interface OIndexManagerclusterName - cluster to add.indexName - name of index.public void removeClusterFromIndex(String clusterName, String indexName)
OIndexManagerremoveClusterFromIndex in interface OIndexManagerclusterName - cluster to remove.indexName - name of index.public boolean existsIndex(String iName)
OIndexManagerexistsIndex in interface OIndexManageriName - name of index.public String getDefaultClusterName()
OIndexManagergetDefaultClusterName in interface OIndexManagerpublic void setDefaultClusterName(String defaultClusterName)
OIndexManagersetDefaultClusterName in interface OIndexManagerdefaultClusterName - name of new default clusterpublic ODictionary<ORecord> getDictionary()
OIndexManagergetDictionary in interface OIndexManagerpublic ODocument getConfiguration()
OIndexManagergetConfiguration in interface OIndexManagerpublic void close()
OCloseableclose in interface OCloseablepublic OIndexManager setDirty()
public 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 OIndexUnique getClassUniqueIndex(String className)
OIndexManagergetClassUniqueIndex in interface OIndexManagerpublic OIndex<?> getClassIndex(String className, String indexName)
OIndexManagergetClassIndex in interface OIndexManagerclassName - name of class which is indexed.indexName - name of index.public OIndex<?> getClassAutoShardingIndex(String className)
OIndexManagergetClassAutoShardingIndex in interface OIndexManagerclassName - Class nameprotected void acquireSharedLock()
protected void releaseSharedLock()
protected void acquireExclusiveLock()
protected void releaseExclusiveLock()
protected void clearMetadata()
protected static ODatabaseDocumentInternal getDatabase()
protected ODatabaseDocumentInternal getDatabaseIfDefined()
protected void addIndexInternal(OIndex<?> index)
protected static Map<OMultiKey,Set<OIndex<?>>> copyPropertyMap(Map<OMultiKey,Set<OIndex<?>>> original)
protected List<String> normalizeFieldNames(Collection<String> fieldNames)
protected Locale getServerLocale()
Copyright © 2009–2025 OrientDB. All rights reserved.