public interface TitanManagement extends TitanConfiguration
TitanTransaction and therefore copies many of its methods as they relate to schema inspection
and definition.
TitanManagement behaves like a transaction in that it opens a transactional scope for reading the schema and making
changes to it. As such, it needs to be explicitly closed via its commit() or rollback() methods.
A TitanManagement transaction is opened on a graph via TitanGraph.getManagementSystem().
TitanManagement provides methods to:
| Modifier and Type | Interface and Description |
|---|---|
static interface |
TitanManagement.IndexBuilder
Builder for
TitanGraphIndex. |
| Modifier and Type | Method and Description |
|---|---|
void |
addIndexKey(TitanGraphIndex index,
PropertyKey key,
Parameter... parameters) |
TitanManagement.IndexBuilder |
buildIndex(String indexName,
Class<? extends com.tinkerpop.blueprints.Element> elementType)
Returns an
TitanManagement.IndexBuilder to add a graph index to this Titan graph. |
void |
commit()
Commits this management transaction and persists all schema changes.
|
boolean |
containsGraphIndex(String name)
Whether the graph has a graph index defined with the given name.
|
boolean |
containsRelationIndex(RelationType type,
String name)
Whether a
RelationTypeIndex with the given name has been defined for the provided RelationType |
boolean |
containsRelationType(String name)
Identical to
TitanTransaction.containsRelationType(String) |
boolean |
containsVertexLabel(String name)
Identical to
TitanTransaction.containsVertexLabel(String) |
RelationTypeIndex |
createEdgeIndex(EdgeLabel label,
String name,
com.tinkerpop.blueprints.Direction direction,
Order sortOrder,
RelationType... sortKeys)
Creates a
RelationTypeIndex for the provided edge label. |
RelationTypeIndex |
createEdgeIndex(EdgeLabel label,
String name,
com.tinkerpop.blueprints.Direction direction,
RelationType... sortKeys)
|
RelationTypeIndex |
createPropertyIndex(PropertyKey key,
String name,
Order sortOrder,
RelationType... sortKeys)
Creates a
RelationTypeIndex for the provided property key. |
RelationTypeIndex |
createPropertyIndex(PropertyKey key,
String name,
RelationType... sortKeys)
|
ConsistencyModifier |
getConsistency(TitanSchemaElement element)
Retrieves the consistency modifier for the given
TitanSchemaElement. |
EdgeLabel |
getEdgeLabel(String name)
Identical to
TitanTransaction.getEdgeLabel(String) |
TitanGraphIndex |
getGraphIndex(String name)
Returns the graph index with the given name or null if it does not exist
|
Iterable<TitanGraphIndex> |
getGraphIndexes(Class<? extends com.tinkerpop.blueprints.Element> elementType)
Returns all graph indexes that index the given element type.
|
PropertyKey |
getPropertyKey(String name)
Identical to
TitanTransaction.getPropertyKey(String) |
RelationTypeIndex |
getRelationIndex(RelationType type,
String name)
Returns the
RelationTypeIndex with the given name for the provided RelationType or null
if it does not exist |
Iterable<RelationTypeIndex> |
getRelationIndexes(RelationType type)
|
RelationType |
getRelationType(String name)
Identical to
TitanTransaction.getRelationType(String) |
<T extends RelationType> |
getRelationTypes(Class<T> clazz)
Returns an iterable over all defined types that have the given clazz (either
EdgeLabel which returns all labels,
PropertyKey which returns all keys, or RelationType which returns all types). |
VertexLabel |
getVertexLabel(String name)
Identical to
TitanTransaction.getVertexLabel(String) |
Iterable<VertexLabel> |
getVertexLabels()
Returns an
Iterable over all defined VertexLabels. |
boolean |
isOpen()
Whether this management transaction is open or has been closed (i.e.
|
EdgeLabelMaker |
makeEdgeLabel(String name)
Identical to
TitanTransaction.makeEdgeLabel(String) |
PropertyKeyMaker |
makePropertyKey(String name)
Identical to
TitanTransaction.makePropertyKey(String) |
VertexLabelMaker |
makeVertexLabel(String name)
Identical to
TitanTransaction.makeVertexLabel(String) |
void |
rollback()
Closes this management transaction and discards all changes.
|
void |
setConsistency(TitanSchemaElement element,
ConsistencyModifier consistency)
Sets the consistency modifier for the given
TitanSchemaElement. |
get, setRelationTypeIndex createEdgeIndex(EdgeLabel label, String name, com.tinkerpop.blueprints.Direction direction, RelationType... sortKeys)
createEdgeIndex(com.thinkaurelius.titan.core.EdgeLabel, String, com.tinkerpop.blueprints.Direction, com.thinkaurelius.titan.core.Order, com.thinkaurelius.titan.core.RelationType...)
with default sort order Order.ASC.label - name - direction - sortKeys - RelationTypeIndexRelationTypeIndex createEdgeIndex(EdgeLabel label, String name, com.tinkerpop.blueprints.Direction direction, Order sortOrder, RelationType... sortKeys)
RelationTypeIndex for the provided edge label. That means, that all edges of that label will be
indexed according to this index definition which will speed up certain vertex-centric queries.
An indexed is defined by its name, the direction in which the index should be created (can be restricted to one
direction or both), the sort order and - most importantly - the sort keys which define the index key.label - name - direction - sortOrder - sortKeys - RelationTypeIndexRelationTypeIndex createPropertyIndex(PropertyKey key, String name, RelationType... sortKeys)
createPropertyIndex(com.thinkaurelius.titan.core.PropertyKey, String, com.thinkaurelius.titan.core.Order, com.thinkaurelius.titan.core.RelationType...)
with default sort order Order.ASC.key - name - sortKeys - RelationTypeIndexRelationTypeIndex createPropertyIndex(PropertyKey key, String name, Order sortOrder, RelationType... sortKeys)
RelationTypeIndex for the provided property key. That means, that all properties of that key will be
indexed according to this index definition which will speed up certain vertex-centric queries.
An indexed is defined by its name, the sort order and - most importantly - the sort keys which define the index key.key - name - sortOrder - sortKeys - RelationTypeIndexboolean containsRelationIndex(RelationType type, String name)
RelationTypeIndex with the given name has been defined for the provided RelationTypetype - name - RelationTypeIndex getRelationIndex(RelationType type, String name)
RelationTypeIndex with the given name for the provided RelationType or null
if it does not existtype - name - Iterable<RelationTypeIndex> getRelationIndexes(RelationType type)
type - boolean containsGraphIndex(String name)
name - TitanGraphIndex getGraphIndex(String name)
name - Iterable<TitanGraphIndex> getGraphIndexes(Class<? extends com.tinkerpop.blueprints.Element> elementType)
elementType - TitanManagement.IndexBuilder buildIndex(String indexName, Class<? extends com.tinkerpop.blueprints.Element> elementType)
TitanManagement.IndexBuilder to add a graph index to this Titan graph. The index to-be-created
has the provided name and indexes elements of the given type.indexName - elementType - void addIndexKey(TitanGraphIndex index, PropertyKey key, Parameter... parameters)
ConsistencyModifier getConsistency(TitanSchemaElement element)
TitanSchemaElement. If none has been explicitly
defined, ConsistencyModifier.DEFAULT is returned.element - void setConsistency(TitanSchemaElement element, ConsistencyModifier consistency)
TitanSchemaElement. Note, that only RelationTypes
and internal graph indexes allow changing of the consistency level.element - consistency - boolean containsRelationType(String name)
TitanTransaction.containsRelationType(String)name - RelationType getRelationType(String name)
TitanTransaction.getRelationType(String)name - PropertyKey getPropertyKey(String name)
TitanTransaction.getPropertyKey(String)name - EdgeLabel getEdgeLabel(String name)
TitanTransaction.getEdgeLabel(String)name - PropertyKeyMaker makePropertyKey(String name)
TitanTransaction.makePropertyKey(String)name - EdgeLabelMaker makeEdgeLabel(String name)
TitanTransaction.makeEdgeLabel(String)name - <T extends RelationType> Iterable<T> getRelationTypes(Class<T> clazz)
EdgeLabel which returns all labels,
PropertyKey which returns all keys, or RelationType which returns all types).T - clazz - RelationType or sub-interfaceboolean containsVertexLabel(String name)
TitanTransaction.containsVertexLabel(String)name - VertexLabel getVertexLabel(String name)
TitanTransaction.getVertexLabel(String)name - VertexLabelMaker makeVertexLabel(String name)
TitanTransaction.makeVertexLabel(String)name - Iterable<VertexLabel> getVertexLabels()
Iterable over all defined VertexLabels.boolean isOpen()
void commit()
TitanTransaction.commit()void rollback()
TitanTransaction.rollback()Copyright © 2012–2014. All rights reserved.