public final class TinkerGraph extends Object implements Graph
close()), reference implementation of the property
graph interfaces provided by TinkerPop.| Modifier and Type | Class and Description |
|---|---|
static class |
TinkerGraph.DefaultIdManager
A default set of
TinkerGraph.IdManager implementations for common identifier types. |
static interface |
TinkerGraph.IdManager<T>
TinkerGraph will use an implementation of this interface to generate identifiers when a user does not supply
them and to handle identifier conversions when querying to provide better flexibility with respect to
handling different data types that mean the same thing.
|
class |
TinkerGraph.TinkerGraphEdgeFeatures |
class |
TinkerGraph.TinkerGraphFeatures |
class |
TinkerGraph.TinkerGraphGraphFeatures |
class |
TinkerGraph.TinkerGraphVertexFeatures |
class |
TinkerGraph.TinkerGraphVertexPropertyFeatures |
Graph.Exceptions, Graph.Features, Graph.Hidden, Graph.OptIn, Graph.OptIns, Graph.OptOut, Graph.OptOuts, Graph.Variables| Modifier and Type | Method and Description |
|---|---|
Vertex |
addVertex(Object... keyValues) |
void |
clear() |
void |
close()
This method only has an effect if the
GREMLIN_TINKERGRAPH_GRAPH_LOCATION is set, in which case the
data in the graph is persisted to that location. |
GraphComputer |
compute() |
<C extends GraphComputer> |
compute(Class<C> graphComputerClass) |
org.apache.commons.configuration2.Configuration |
configuration() |
<E extends Element> |
createIndex(String key,
Class<E> elementClass)
|
<E extends Element> |
dropIndex(String key,
Class<E> elementClass)
|
Iterator<Edge> |
edges(Object... edgeIds) |
Graph.Features |
features()
Return TinkerGraph feature set.
|
<E extends Element> |
getIndexedKeys(Class<E> elementClass)
|
<I extends Io> |
io(Io.Builder<I> builder) |
static TinkerGraph |
open()
Open a new
TinkerGraph instance. |
static TinkerGraph |
open(org.apache.commons.configuration2.Configuration configuration)
Open a new
TinkerGraph instance. |
String |
toString() |
Transaction |
tx() |
Graph.Variables |
variables() |
Iterator<Vertex> |
vertices(Object... vertexIds) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddVertex, traversal, traversal, txgetHostingVertexpublic static final String GREMLIN_TINKERGRAPH_VERTEX_ID_MANAGER
public static final String GREMLIN_TINKERGRAPH_EDGE_ID_MANAGER
public static final String GREMLIN_TINKERGRAPH_VERTEX_PROPERTY_ID_MANAGER
public static final String GREMLIN_TINKERGRAPH_DEFAULT_VERTEX_PROPERTY_CARDINALITY
public static final String GREMLIN_TINKERGRAPH_GRAPH_LOCATION
public static final String GREMLIN_TINKERGRAPH_GRAPH_FORMAT
public static final String GREMLIN_TINKERGRAPH_ALLOW_NULL_PROPERTY_VALUES
protected AtomicLong currentId
protected TinkerGraphVariables variables
protected TinkerGraphComputerView graphComputerView
protected org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerIndex<TinkerVertex> vertexIndex
protected org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerIndex<TinkerEdge> edgeIndex
protected final TinkerGraph.IdManager<?> vertexIdManager
protected final TinkerGraph.IdManager<?> edgeIdManager
protected final TinkerGraph.IdManager<?> vertexPropertyIdManager
protected final VertexProperty.Cardinality defaultVertexPropertyCardinality
protected final boolean allowNullPropertyValues
public static TinkerGraph open()
TinkerGraph instance.
Reference Implementation Help: If a Graph implementation does not require a Configuration
(or perhaps has a default configuration) it can choose to implement a zero argument
open() method. This is an optional constructor method for TinkerGraph. It is not enforced by the Gremlin
Test Suite.public static TinkerGraph open(org.apache.commons.configuration2.Configuration configuration)
TinkerGraph instance.
Reference Implementation Help: This method is the one use by the GraphFactory to instantiate
Graph instances. This method must be overridden for the Structure Test Suite to pass. Implementers have
latitude in terms of how exceptions are handled within this method. Such exceptions will be considered
implementation specific by the test suite as all test generate graph instances by way of
GraphFactory. As such, the exceptions get generalized behind that facade and since
GraphFactory is the preferred method to opening graphs it will be consistent at that level.configuration - the configuration for the instanceGraphpublic <C extends GraphComputer> C compute(Class<C> graphComputerClass)
public GraphComputer compute()
public Graph.Variables variables()
public <I extends Io> I io(Io.Builder<I> builder)
public void clear()
public void close()
GREMLIN_TINKERGRAPH_GRAPH_LOCATION is set, in which case the
data in the graph is persisted to that location. This method may be called multiple times and does not release
resources.close in interface AutoCloseableclose in interface Graphpublic Transaction tx()
public org.apache.commons.configuration2.Configuration configuration()
configuration in interface Graphpublic Graph.Features features()
Graph.Features return true.public <E extends Element> void createIndex(String key, Class<E> elementClass)
Vertex or Edge) and said property key.
Whenever an element has the specified key mutated, the index is updated.
When the index is created, all existing elements are indexed to ensure that they are captured by the index.E - The type of the element classkey - the property key to indexelementClass - the element class to indexpublic <E extends Element> void dropIndex(String key, Class<E> elementClass)
E - The type of the element classkey - the property key to stop indexingelementClass - the element class of the index to dropCopyright © 2013–2021 Apache Software Foundation. All rights reserved.