public class ManagementSystem extends Object implements TitanManagement
| Constructor and Description |
|---|
ManagementSystem(StandardTitanGraph graph,
KCVSConfiguration config,
Log sysLog,
ManagementLogger mgmtLogger) |
| 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)
|
String |
get(String path)
Returns a string representation of the provided configuration option or namespace for inspection.
|
ConsistencyModifier |
getConsistency(TitanSchemaElement element)
Retrieves the consistency level for a schema element (types and internal indexes)
|
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
|
static IndexType |
getGraphIndexDirect(String name,
StandardTitanTx transaction) |
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). |
TitanSchemaElement |
getSchemaElement(long id) |
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.
|
TitanConfiguration |
set(String path,
Object value)
Sets the configuration option identified by the provided path to the given value.
|
void |
setConsistency(TitanSchemaElement element,
ConsistencyModifier consistency)
Sets the consistency level for those schema elements that support it (types and internal indexes)
|
public ManagementSystem(StandardTitanGraph graph, KCVSConfiguration config, Log sysLog, ManagementLogger mgmtLogger)
public void commit()
TitanManagementcommit in interface TitanManagementTitanTransaction.commit()public void rollback()
TitanManagementrollback in interface TitanManagementTitanTransaction.rollback()public boolean isOpen()
TitanManagementisOpen in interface TitanManagementpublic TitanSchemaElement getSchemaElement(long id)
public RelationTypeIndex createEdgeIndex(EdgeLabel label, String name, com.tinkerpop.blueprints.Direction direction, RelationType... sortKeys)
TitanManagementTitanManagement.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.createEdgeIndex in interface TitanManagementRelationTypeIndexpublic RelationTypeIndex createEdgeIndex(EdgeLabel label, String name, com.tinkerpop.blueprints.Direction direction, Order sortOrder, RelationType... sortKeys)
TitanManagementRelationTypeIndex 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.createEdgeIndex in interface TitanManagementRelationTypeIndexpublic RelationTypeIndex createPropertyIndex(PropertyKey key, String name, RelationType... sortKeys)
TitanManagementTitanManagement.createPropertyIndex(com.thinkaurelius.titan.core.PropertyKey, String, com.thinkaurelius.titan.core.Order, com.thinkaurelius.titan.core.RelationType...)
with default sort order Order.ASC.createPropertyIndex in interface TitanManagementRelationTypeIndexpublic RelationTypeIndex createPropertyIndex(PropertyKey key, String name, Order sortOrder, RelationType... sortKeys)
TitanManagementRelationTypeIndex 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.createPropertyIndex in interface TitanManagementRelationTypeIndexpublic boolean containsRelationIndex(RelationType type, String name)
TitanManagementRelationTypeIndex with the given name has been defined for the provided RelationTypecontainsRelationIndex in interface TitanManagementpublic RelationTypeIndex getRelationIndex(RelationType type, String name)
TitanManagementRelationTypeIndex with the given name for the provided RelationType or null
if it does not existgetRelationIndex in interface TitanManagementpublic Iterable<RelationTypeIndex> getRelationIndexes(RelationType type)
TitanManagementgetRelationIndexes in interface TitanManagementpublic static IndexType getGraphIndexDirect(String name, StandardTitanTx transaction)
public boolean containsGraphIndex(String name)
TitanManagementcontainsGraphIndex in interface TitanManagementpublic TitanGraphIndex getGraphIndex(String name)
TitanManagementgetGraphIndex in interface TitanManagementpublic Iterable<TitanGraphIndex> getGraphIndexes(Class<? extends com.tinkerpop.blueprints.Element> elementType)
TitanManagementgetGraphIndexes in interface TitanManagementpublic void addIndexKey(TitanGraphIndex index, PropertyKey key, Parameter... parameters)
addIndexKey in interface TitanManagementpublic TitanManagement.IndexBuilder buildIndex(String indexName, Class<? extends com.tinkerpop.blueprints.Element> elementType)
TitanManagementTitanManagement.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.buildIndex in interface TitanManagementpublic ConsistencyModifier getConsistency(TitanSchemaElement element)
getConsistency in interface TitanManagementelement - public void setConsistency(TitanSchemaElement element, ConsistencyModifier consistency)
setConsistency in interface TitanManagementelement - consistency - public boolean containsRelationType(String name)
TitanManagementTitanTransaction.containsRelationType(String)containsRelationType in interface TitanManagementpublic RelationType getRelationType(String name)
TitanManagementTitanTransaction.getRelationType(String)getRelationType in interface TitanManagementpublic PropertyKey getPropertyKey(String name)
TitanManagementTitanTransaction.getPropertyKey(String)getPropertyKey in interface TitanManagementpublic EdgeLabel getEdgeLabel(String name)
TitanManagementTitanTransaction.getEdgeLabel(String)getEdgeLabel in interface TitanManagementpublic PropertyKeyMaker makePropertyKey(String name)
TitanManagementTitanTransaction.makePropertyKey(String)makePropertyKey in interface TitanManagementpublic EdgeLabelMaker makeEdgeLabel(String name)
TitanManagementTitanTransaction.makeEdgeLabel(String)makeEdgeLabel in interface TitanManagementpublic <T extends RelationType> Iterable<T> getRelationTypes(Class<T> clazz)
TitanManagementEdgeLabel which returns all labels,
PropertyKey which returns all keys, or RelationType which returns all types).getRelationTypes in interface TitanManagementclazz - RelationType or sub-interfacepublic boolean containsVertexLabel(String name)
TitanManagementTitanTransaction.containsVertexLabel(String)containsVertexLabel in interface TitanManagementpublic VertexLabel getVertexLabel(String name)
TitanManagementTitanTransaction.getVertexLabel(String)getVertexLabel in interface TitanManagementpublic VertexLabelMaker makeVertexLabel(String name)
TitanManagementTitanTransaction.makeVertexLabel(String)makeVertexLabel in interface TitanManagementpublic Iterable<VertexLabel> getVertexLabels()
TitanManagementIterable over all defined VertexLabels.getVertexLabels in interface TitanManagementpublic String get(String path)
TitanConfigurationget in interface TitanConfigurationpublic TitanConfiguration set(String path, Object value)
TitanConfigurationset in interface TitanConfigurationCopyright © 2012–2014. All rights reserved.