public final class OIndexes extends Object
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
Modifier and Type | Method and Description |
---|---|
static String |
chooseDefaultIndexAlgorithm(String type) |
static OIndexInternal |
createIndex(OStorage storage,
String name,
String indexType,
String algorithm,
String valueContainerAlgorithm,
ODocument metadata,
int version) |
static OBaseIndexEngine |
createIndexEngine(int indexId,
String name,
String algorithm,
String type,
Boolean durableInNonTxMode,
OStorage storage,
int version,
int apiVersion,
boolean multivalue,
Map<String,String> indexProperties) |
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 void |
registerFactory(OIndexFactory factory)
Register at runtime custom factories
|
static void |
unregisterFactory(OIndexFactory factory)
Unregister custom factories
|
public static Iterator<OIndexFactory> getAllFactories()
public static Set<String> getIndexEngines()
public static OIndexFactory getFactory(String indexType, String algorithm)
public static OIndexInternal createIndex(OStorage storage, String name, String indexType, String algorithm, String valueContainerAlgorithm, ODocument metadata, int version) throws OConfigurationException, OIndexException
storage
- TODOindexType
- index typeOConfigurationException
- if index creation failedOIndexException
- if index type does not existpublic static OBaseIndexEngine createIndexEngine(int indexId, String name, String algorithm, String type, Boolean durableInNonTxMode, OStorage storage, int version, int apiVersion, boolean multivalue, Map<String,String> indexProperties)
public static void registerFactory(OIndexFactory factory)
public static void unregisterFactory(OIndexFactory factory)
Copyright © 2009–2020 OrientDB. All rights reserved.