public abstract class OracleIndexManager extends Object
OraclePropertyGraphBase
object.Modifier and Type | Field and Description |
---|---|
static int |
EDGE_CLASS_ID |
static int |
VERTEX_CLASS_ID |
Constructor and Description |
---|
OracleIndexManager(OraclePropertyGraphBase opg)
Creates a new OracleIndexManager object, handling external indexes associated to the specified property graph.
|
Modifier and Type | Method and Description |
---|---|
void |
clearAndCloseIndices()
Clear and close all manual and automatic indices defined for the underlying property graph.
|
void |
clearIndices()
Clears all the data of the existing indices (manual and automatic) created on top of the underlying property graph
|
void |
close()
Closes this index manager object.
|
void |
closeIndices()
Closes and commits all opened indices stored in cache.
|
void |
commitIndices()
Commits all open indices.
|
<T extends Element> |
containsIndexedKey(String key, Class<T> indexClass)
Verifies if the auto index contains the specified index key.
|
<T extends Element> |
createIndex(String indexName, Class<T> indexClass, OraclePropertyGraphBase pg, Parameter... indexParameters)
Generates an index with a particular name, for a particular class, and of a particular type.
|
void |
disableEdgeAutoIndexer()
Disables the edge auto indexing.
|
void |
disableVertexAutoIndexer()
Disables the vertex auto indexing.
|
void |
dropAllAutoIndices()
Removes all the automatic indices created on top of the underlying property graph
|
void |
dropAllIndices()
Drops all indices handled by this index manager.
|
void |
dropAllManualIndices()
Removes all manual indices created on top of the underlying property graph.
|
void |
dropIndex(String indexName)
Drops the specified manual index
|
<T extends Element> |
dropIndices()
Removes all manual and automatic indexes created on top of the underlying property graph.
|
void |
enableEdgeAutoIndexer()
Enables the edge auto indexing.
|
void |
enableVertexAutoIndexer()
Enables the vertex auto indexing.
|
boolean |
existEdgeIndex(String indexName)
Verifies if the index with the specified name already exists for this property graph as an edge manual index.
|
boolean |
existVertexIndex(String indexName)
Verifies if the manual vertex index with the specified name already exists for this property graph.
|
OracleAutoIndex<Edge> |
getEdgeAutoIndexer(Parameter... indexParameters)
Gets the edge auto index associated to this property graph if enabled.
|
String |
getEdgeAutoIndexName()
Gets the name used for the edge auto index.
|
<T extends Element> |
getEdgeIndex(String indexName)
Gets the edge manual index associated to the specified index name
|
static <T extends Element> |
getEntityTypeAsInt(Class<T> indexClass)
Gets the identifier associated to the specified index Class.
|
abstract <T extends Element> |
getIndexedKeys(String indexName, Class<T> indexClass)
Gets all the keys associated to the specified auto index and stored in the index meta data table.
|
Iterable<Index<? extends Element>> |
getIndices()
Gets all the manual indices managed by this index manager
|
OracleAutoIndex<Vertex> |
getVertexAutoIndexer(Parameter... indexParameters)
Gets the vertex automatic index associated to this property graph if enabled.
|
String |
getVertexAutoIndexName()
Gets the name used for the vertex auto index.
|
<T extends Element> |
getVertexIndex(String indexName)
Gets the manual vertex index associated to the specified index name
|
<T extends Element> |
indexAlreadyExists(String indexName, Class<T> indexClass)
Verifies if the index with the specified name already exists for this property graph.
|
boolean |
isEdgeAutoIndexerEnabled()
Verifies if the edge auto indexer is enabled.
|
boolean |
isVertexAutoIndexerEnabled()
Verifies if the vertex auto indexer is enabled.
|
void |
remove(Object element)
Removes the specified element from all the indices handled by this OracleIndex Manager object.
|
void |
removePropertyFromIndices(String key, Object element)
Removes the property associated to the specified element from all the indices handled by this OracleIndex Manager.
|
<T extends Element> |
startAutoIndexingProperties(String[] keys, Class<T> elementClass)
Adds the specified keys to the properties used for auto indexing.
|
<T extends Element> |
startAutoIndexingProperty(String key, Class<T> elementClass)
Adds the specified key to the properties used for auto indexing.
|
<T extends Element> |
stopAutoIndexingProperties(String[] keys, Class<T> elementClass)
Removes the specified keys to the properties used for auto indexing.
|
<T extends Element> |
stopAutoIndexingProperty(String key, Class<T> elementClass)
Removes the specified key to the properties used for auto indexing.
|
public static final int EDGE_CLASS_ID
public static final int VERTEX_CLASS_ID
public OracleIndexManager(OraclePropertyGraphBase opg)
opg
- a OraclePropertyGraphBase
object.public final void clearAndCloseIndices()
public final void clearIndices()
public final void close()
public final void closeIndices()
public final void commitIndices()
public final <T extends Element> boolean containsIndexedKey(String key, Class<T> indexClass)
key
- the key to validate.indexClass
- index classpublic final <T extends Element> OracleIndex<T> createIndex(String indexName, Class<T> indexClass, OraclePropertyGraphBase pg, Parameter... indexParameters)
indexName
- the name of the indexindexClass
- the element class that this index is indexing (can be base class)indexParameters
- a collection of parameters for the underlying index implementationpublic final void disableEdgeAutoIndexer()
public final void disableVertexAutoIndexer()
public final void dropAllAutoIndices()
public final void dropAllIndices()
public final void dropAllManualIndices()
public final void dropIndex(String indexName)
indexName
- the name of the index to removepublic final <T extends Element> void dropIndices()
public final void enableEdgeAutoIndexer()
public final void enableVertexAutoIndexer()
public final boolean existEdgeIndex(String indexName)
indexName
- the name of the index.public final boolean existVertexIndex(String indexName)
indexName
- the name of the index.public OracleAutoIndex<Edge> getEdgeAutoIndexer(Parameter... indexParameters)
OracleAutoIndex
objectpublic final String getEdgeAutoIndexName()
public final <T extends Element> OracleIndex<T> getEdgeIndex(String indexName)
indexName
- the name of the index to obtainOracleIndex
objectpublic static final <T extends Element> int getEntityTypeAsInt(Class<T> indexClass)
indexClass
- the class associated to this index (Vertex, Edge)public abstract <T extends Element> List<String> getIndexedKeys(String indexName, Class<T> indexClass)
indexName
- the name of the auto index.indexClass
- the class associated to the index (Vertex, Edge)public final Iterable<Index<? extends Element>> getIndices()
public final OracleAutoIndex<Vertex> getVertexAutoIndexer(Parameter... indexParameters)
OracleAutoIndex
objectpublic final String getVertexAutoIndexName()
public final <T extends Element> OracleIndex<T> getVertexIndex(String indexName)
indexName
- the name of the index to obtainOracleIndex
objectpublic final <T extends Element> boolean indexAlreadyExists(String indexName, Class<T> indexClass)
indexName
- the name of the index.public final boolean isEdgeAutoIndexerEnabled()
public final boolean isVertexAutoIndexerEnabled()
public final void remove(Object element)
element
- the element to remove.public final void removePropertyFromIndices(String key, Object element)
key
- the key to removeelement
- the element where the K/V pair will be removedpublic final <T extends Element> void startAutoIndexingProperties(String[] keys, Class<T> elementClass)
keys
- the keys which will be used to generate the indexelementClass
- the class of the auto index.public final <T extends Element> void startAutoIndexingProperty(String key, Class<T> elementClass)
key
- the key which will be used to generate the indexelementClass
- the class of the auto index.public final <T extends Element> void stopAutoIndexingProperties(String[] keys, Class<T> elementClass)
keys
- an array of keys to be used to generate the indexelementClass
- the class of the auto index.public final <T extends Element> void stopAutoIndexingProperty(String key, Class<T> elementClass)
key
- the key which will be used to generate the indexelementClass
- the class of the auto index.Copyright © 2015 Oracle and/or its afflilates. All Rights Reserved.