Class OIndexes
java.lang.Object
com.orientechnologies.orient.core.index.OIndexes
Utility class to create indexes. New OIndexFactory can be registered
In order to be detected, factories must implement the OIndexFactory interface.
In addition to implementing this interface datasources should have a services file:
META-INF/services/com.orientechnologies.orient.core.index.OIndexFactory
The file should contain a single line which gives the full name of the implementing class.
Example:
org.mycompany.index.MyIndexFactory
- Author:
- Johann Sorel (Geomatys)
-
Method Summary
Modifier and TypeMethodDescriptionstatic Stringstatic OIndexInternalcreateIndex(OStorage storage, OIndexMetadata metadata) static OBaseIndexEnginecreateIndexEngine(OStorage storage, IndexEngineData metadata) static Iterator<OIndexFactory>static OIndexFactorygetFactory(String indexType, String algorithm) Iterates on all factories and append all index engines.static voidregisterFactory(OIndexFactory factory) Register at runtime custom factoriesstatic voidunregisterFactory(OIndexFactory factory) Unregister custom factories
-
Method Details
-
getAllFactories
- Returns:
- Iterator of all index factories
-
getIndexEngines
Iterates on all factories and append all index engines.- Returns:
- Set of all index engines.
-
getFactory
-
createIndex
public static OIndexInternal createIndex(OStorage storage, OIndexMetadata metadata) throws OConfigurationException, OIndexException - Parameters:
storage- TODOindexType- index type- Returns:
- OIndexInternal
- Throws:
OConfigurationException- if index creation failedOIndexException- if index type does not exist
-
createIndexEngine
-
chooseDefaultIndexAlgorithm
-
registerFactory
Register at runtime custom factories -
unregisterFactory
Unregister custom factories
-