
public final class OIndexes extends Object
In order to be detected, factories must implement the OIndexFactory interface.
In addition to implementing this interface datasouces 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
| Modifier and Type | Method and Description |
|---|---|
static String |
chooseDefaultIndexAlgorithm(String type) |
static OIndexInternal<?> |
createIndex(ODatabaseDocumentInternal database,
String name,
String indexType,
String algorithm,
String valueContainerAlgorithm,
ODocument metadata,
int version) |
static OIndexEngine |
createIndexEngine(String name,
String algorithm,
String type,
Boolean durableInNonTxMode,
OStorage storage,
int version,
Map<String,String> indexProperties,
ODocument metadata) |
static OIndexFactory |
findFactoryByAlgorithmAndType(String algorithm,
String indexType) |
static Iterator<OIndexFactory> |
getAllFactories() |
static OIndexFactory |
getFactory(String indexType,
String algorithm) |
static Set<String> |
getIndexEngines()
Iterates on all factories and append all index engines.
|
static Set<String> |
getIndexTypes()
Iterates on all factories and append all index types.
|
static void |
registerFactory(OIndexFactory factory)
Register at runtime custom factories
|
static void |
scanForPlugins()
Scans for factory plug-ins on the application class path.
|
static void |
unregisterFactory(OIndexFactory factory)
Unregister custom factories
|
public static Iterator<OIndexFactory> getAllFactories()
public static Set<String> getIndexTypes()
public static Set<String> getIndexEngines()
public static OIndexFactory getFactory(String indexType, String algorithm)
public static OIndexInternal<?> createIndex(ODatabaseDocumentInternal database, String name, String indexType, String algorithm, String valueContainerAlgorithm, ODocument metadata, int version) throws OConfigurationException, OIndexException
database - name - indexType - index typealgorithm - valueContainerAlgorithm - OConfigurationException - if index creation failedOIndexException - if index type does not existpublic static OIndexFactory findFactoryByAlgorithmAndType(String algorithm, String indexType)
public static OIndexEngine createIndexEngine(String name, String algorithm, String type, Boolean durableInNonTxMode, OStorage storage, int version, Map<String,String> indexProperties, ODocument metadata)
public static void scanForPlugins()
public static void registerFactory(OIndexFactory factory)
factory - public static void unregisterFactory(OIndexFactory factory)
factory - Copyright © 2009–2025 OrientDB. All rights reserved.