public class PartitionGraph<T extends Graph> extends Object implements Graph, WrapperGraph<T>
| Constructor and Description |
|---|
PartitionGraph(T baseGraph,
String partitionKey,
String readWritePartition) |
PartitionGraph(T baseGraph,
String partitionKey,
String writePartition,
Set<String> readPartitions) |
| Modifier and Type | Method and Description |
|---|---|
Edge |
addEdge(Object id,
Vertex outVertex,
Vertex inVertex,
String label)
Add an edge to the graph.
|
void |
addReadPartition(String readPartition) |
Vertex |
addVertex(Object id)
Create a new vertex, add it to the graph, and return the newly created vertex.
|
T |
getBaseGraph()
Get the graph this wrapper delegates to.
|
Edge |
getEdge(Object id)
Return the edge referenced by the provided object identifier.
|
Iterable<Edge> |
getEdges()
Return an iterable to all the edges in the graph.
|
Iterable<Edge> |
getEdges(String key,
Object value)
Return an iterable to all the edges in the graph that have a particular key/value property.
|
Features |
getFeatures()
Get the particular features of the graph implementation.
|
String |
getPartitionKey() |
Set<String> |
getReadPartitions() |
Vertex |
getVertex(Object id)
Return the vertex referenced by the provided object identifier.
|
Iterable<Vertex> |
getVertices()
Return an iterable to all the vertices in the graph.
|
Iterable<Vertex> |
getVertices(String key,
Object value)
Return an iterable to all the vertices in the graph that have a particular key/value property.
|
String |
getWritePartition() |
boolean |
isInPartition(Element element) |
GraphQuery |
query()
Generate a query object that can be used to fine tune which edges/vertices are retrieved from the graph.
|
void |
removeEdge(Edge edge)
Remove the provided edge from the graph.
|
void |
removeReadPartition(String readPartition) |
void |
removeVertex(Vertex vertex)
Remove the provided vertex from the graph.
|
void |
setPartitionKey(String partitionKey) |
void |
setWritePartition(String writePartition) |
void |
shutdown()
A shutdown function is required to properly close the graph.
|
String |
toString() |
public PartitionGraph(T baseGraph, String partitionKey, String writePartition, Set<String> readPartitions)
public String getWritePartition()
public void setWritePartition(String writePartition)
public void removeReadPartition(String readPartition)
public void addReadPartition(String readPartition)
public void setPartitionKey(String partitionKey)
public String getPartitionKey()
public boolean isInPartition(Element element)
public void shutdown()
Graphpublic Vertex addVertex(Object id)
Graphpublic Vertex getVertex(Object id)
Graphpublic Iterable<Vertex> getVertices()
GraphgetVertices in interface Graphpublic Iterable<Vertex> getVertices(String key, Object value)
GraphgetVertices in interface Graphkey - the key of vertexvalue - the value of the vertexpublic Edge addEdge(Object id, Vertex outVertex, Vertex inVertex, String label)
Graphpublic Edge getEdge(Object id)
Graphpublic Iterable<Edge> getEdges()
Graphpublic Iterable<Edge> getEdges(String key, Object value)
Graphpublic void removeEdge(Edge edge)
GraphremoveEdge in interface Graphedge - the edge to remove from the graphpublic void removeVertex(Vertex vertex)
GraphremoveVertex in interface Graphvertex - the vertex to remove from the graphpublic T getBaseGraph()
WrapperGraphgetBaseGraph in interface WrapperGraph<T extends Graph>public Features getFeatures()
GraphgetFeatures in interface Graphpublic GraphQuery query()
GraphCopyright © 2010-2014. All Rights Reserved.