public class ChronoSphereIndexManagerImpl extends java.lang.Object implements ChronoSphereIndexManager
| Constructor and Description |
|---|
ChronoSphereIndexManagerImpl(ChronoSphereInternal owningSphere,
SphereBranch owningBranch) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
createIndexOn(org.eclipse.emf.ecore.EAttribute eAttribute)
Creates an index on the given
EAttribute. |
boolean |
dropIndexOn(org.eclipse.emf.ecore.EAttribute eAttribute)
Drops an existing index on the given
EAttribute (if such an index exists). |
boolean |
existsIndexOn(org.eclipse.emf.ecore.EAttribute eAttribute)
Checks if the given
EAttribute is indexed or not. |
protected org.chronos.chronograph.api.index.ChronoGraphIndexManager |
getGraphIndexManager() |
boolean |
isIndexDirty(org.eclipse.emf.ecore.EAttribute eAttribute)
Checks if the index on the given
EAttribute is dirty. |
void |
reindex(org.eclipse.emf.ecore.EAttribute eAttribute)
Rebuilds the index on the given
EAttribute from scratch. |
void |
reindexAll()
Re-indexes all dirty indices.
|
public ChronoSphereIndexManagerImpl(ChronoSphereInternal owningSphere, SphereBranch owningBranch)
public boolean createIndexOn(org.eclipse.emf.ecore.EAttribute eAttribute)
ChronoSphereIndexManagerEAttribute.createIndexOn in interface ChronoSphereIndexManagereAttribute - The attribute to index. Must not be null. Must be part of a registered EPackage.true if a new index for the given EAttribute was created, or false if the index already existed.ChronoSphere.getEPackageManager(),
ChronoSphereEPackageManager.registerOrUpdateEPackage(EPackage)public boolean existsIndexOn(org.eclipse.emf.ecore.EAttribute eAttribute)
ChronoSphereIndexManagerEAttribute is indexed or not.existsIndexOn in interface ChronoSphereIndexManagereAttribute - The EAttribute to check. Must not be null. Must be part of a registered EPackage.true if the attribute is indexed, otherwise false.ChronoSphere.getEPackageManager(),
ChronoSphereEPackageManager.registerOrUpdateEPackage(EPackage)public boolean dropIndexOn(org.eclipse.emf.ecore.EAttribute eAttribute)
ChronoSphereIndexManagerEAttribute (if such an index exists).dropIndexOn in interface ChronoSphereIndexManagereAttribute - The EAttribute to drop the index for. Must not be null. Must be part of a registered EPackage.true if an index on the given EAttribute existed and was dropped successfully, or false if there was no such index.ChronoSphere.getEPackageManager(),
ChronoSphereEPackageManager.registerOrUpdateEPackage(EPackage)public void reindexAll()
ChronoSphereIndexManagerThis is a potentially expensive operation that can take a long time, depending on the size of the model stored in the repository. Use it with care.
reindexAll in interface ChronoSphereIndexManagerpublic void reindex(org.eclipse.emf.ecore.EAttribute eAttribute)
ChronoSphereIndexManagerEAttribute from scratch.
This is a potentially expensive operation that can take a long time, depending on the size of the model stored in the repository. Use it with care.
reindex in interface ChronoSphereIndexManagereAttribute - The EAttribute to rebuild the index for. Must not be null. Must be part of a registered EPackage. If there is no index on the given EAttribute, this method is a no-op and returns immediately.ChronoSphereIndexManager.isIndexDirty(EAttribute),
ChronoSphere.getEPackageManager(),
ChronoSphereEPackageManager.registerOrUpdateEPackage(EPackage)public boolean isIndexDirty(org.eclipse.emf.ecore.EAttribute eAttribute)
ChronoSphereIndexManagerEAttribute is dirty.
An index can become dirty e.g. when a new index is created on an already existing model, or when the EPackage contents change. A dirty index is an index that is out-of-synch with the model data and needs to be re-synchronized. This method checks if such re-synchronization is required.
isIndexDirty in interface ChronoSphereIndexManagereAttribute - The EAttribute to check the dirty state of its index for. Must not be null. Must be part of a registered EPackage. If there is no index on the given EAttribute, this method returns false.true if there is an index on the given EAttribute AND that index is dirty, false either if there is no index on the given EAttribute or that index is not dirty.ChronoSphereIndexManager.isIndexDirty(EAttribute),
ChronoSphere.getEPackageManager(),
ChronoSphereEPackageManager.registerOrUpdateEPackage(EPackage)protected org.chronos.chronograph.api.index.ChronoGraphIndexManager getGraphIndexManager()