public interface GraphChangeSet<VID> extends GraphBuilder<VID>
Modifier and Type | Method and Description |
---|---|
EdgeBuilder<VID> |
addEdge(long edgeId, VertexBuilder<VID> srcVertex, VertexBuilder<VID> dstVertex)
Adds an edge with the given edge ID and the given source and destination vertices.
|
EdgeBuilder<VID> |
addEdge(long edgeId, VID srcVertex, VID dstVertex)
Adds an edge with the given edge ID and the given source and destination vertices.
|
VertexBuilder<VID> |
addVertex()
Adds the vertex to the graph builder.
|
VertexBuilder<VID> |
addVertex(VID vertexId)
Adds the vertex with the given id to the graph builder.
|
default PgxGraph |
buildNewSnapshot()
Blocking version of
buildNewSnapshotAsync() . |
PgxFuture<PgxGraph> |
buildNewSnapshotAsync()
Builds a new snapshot of the graph out of
this GraphChangeSet : the resulting PgxGraph is a new snapshot of the PgxGraph object this was created from. |
GraphChangeSet<VID> |
removeEdge(long edgeId)
Removes an edge from the graph.
|
GraphChangeSet<VID> |
removeVertex(VID vertexId)
Removes a vertex from the graph.
|
GraphChangeSet<VID> |
resetEdge(long edgeId)
Resets any change for the edge with the given ID.
|
GraphChangeSet<VID> |
resetVertex(VertexBuilder<VID> vertex)
Resets any change for the given vertex.
|
GraphChangeSet<VID> |
resetVertex(VID vertexId)
Resets any change for the vertex with the given ID.
|
GraphChangeSet<VID> |
setAddExistingEdgePolicy(OnAddExistingElement addExistingEdgePolicy)
Sets the policy on what to do when an edge is added that already exists
|
GraphChangeSet<VID> |
setAddExistingVertexPolicy(OnAddExistingElement addExistingVertexPolicy)
Sets the policy on what to do when a vertex is added that already exists
|
GraphChangeSet<VID> |
setInvalidChangePolicy(OnInvalidChange invalidChangePolicy)
Sets the policy on what to do when an invalid action is added
|
GraphChangeSet<VID> |
setRequiredConversionPolicy(OnRequiredConversion requiredConversionPolicy)
Sets the policy on what to do when an invalid type is encountered
|
default GraphChangeSet<VID> |
setRetainEdgeIds(boolean retainEdgeIds)
Controls whether the edge ids provided in this graph builder are to be retained in the final graph.
|
default GraphChangeSet<VID> |
setRetainIds(boolean retainIds)
Controls for both vertex and edge ids whether to retain them in the final graph.
|
default GraphChangeSet<VID> |
setRetainVertexIds(boolean retainVertexIds)
Controls whether to retain the vertex ids provided in this graph builder are to be retained in the final graph.
|
EdgeModifier<VID> |
updateEdge(long edgeId)
Returns a
EdgeModifier with which you can update edge properties and the edge label. |
VertexModifier<VID> |
updateVertex(VID vertexId)
Returns a
VertexModifier with which you can update vertex properties. |
addEdge, addEdge, build, build, buildAsync, buildAsync, getConfigParameter, setConfigParameter, setDataSourceVersion
EdgeBuilder<VID> addEdge(long edgeId, VertexBuilder<VID> srcVertex, VertexBuilder<VID> dstVertex)
UnsupportedOperationException
if edge Id generation strategy is set to AUTO_GENERATED
addEdge
in interface GraphBuilder<VID>
edgeId
- the ID of the new edgesrcVertex
- a VertexBuilderImpl
instance representing the source vertexdstVertex
- a VertexBuilderImpl
instance representing the destination vertexVertexBuilderImpl
EdgeBuilder<VID> addEdge(long edgeId, VID srcVertex, VID dstVertex)
UnsupportedOperationException
if edge Id generation strategy is set to AUTO_GENERATED
addEdge
in interface GraphBuilder<VID>
edgeId
- the ID of the new edgesrcVertex
- the source ID of the new edgedstVertex
- the destination ID of the new edgeVertexBuilder<VID> addVertex()
UnsupportedOperationException
if vertex Id generation strategy for partitioned graphs . is set to AUTO_GENERATED
addVertex
in interface GraphBuilder<VID>
VertexBuilder<VID> addVertex(VID vertexId)
UnsupportedOperationException
if vertex Id generation strategy is set to AUTO_GENERATED
addVertex
in interface GraphBuilder<VID>
vertexId
- the ID of the new vertexdefault PgxGraph buildNewSnapshot() throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
buildNewSnapshotAsync()
. Calls buildNewSnapshotAsync()
and waits for the returned PgxFuture
to complete.java.lang.InterruptedException
- if the caller thread gets interrupted while waiting for completion.java.util.concurrent.ExecutionException
- if any exception occurred during asynchronous execution. The actual exception will be nested.PgxFuture<PgxGraph> buildNewSnapshotAsync()
this
GraphChangeSet
: the resulting PgxGraph
is a new snapshot of the PgxGraph
object this
was created from.GraphChangeSet<VID> removeEdge(long edgeId)
edgeId
- the ID of the edge to be removedGraphChangeSet<VID> removeVertex(VID vertexId)
vertexId
- the ID of the vertex to be removedGraphChangeSet<VID> resetEdge(long edgeId)
GraphBuilder
resetEdge
in interface GraphBuilder<VID>
edgeId
- the ID of the edge which should be resetGraphChangeSet<VID> resetVertex(VertexBuilder<VID> vertex)
GraphBuilder
resetVertex
in interface GraphBuilder<VID>
vertex
- a VertexBuilder
GraphChangeSet<VID> resetVertex(VID vertexId)
GraphBuilder
resetVertex
in interface GraphBuilder<VID>
vertexId
- the ID of the vertex which should be resetGraphChangeSet<VID> setAddExistingEdgePolicy(OnAddExistingElement addExistingEdgePolicy)
addExistingEdgePolicy
- the new policyGraphChangeSet<VID> setAddExistingVertexPolicy(OnAddExistingElement addExistingVertexPolicy)
addExistingVertexPolicy
- the new policyGraphChangeSet<VID> setInvalidChangePolicy(OnInvalidChange invalidChangePolicy)
invalidChangePolicy
-GraphChangeSet<VID> setRequiredConversionPolicy(OnRequiredConversion requiredConversionPolicy)
requiredConversionPolicy
-default GraphChangeSet<VID> setRetainEdgeIds(boolean retainEdgeIds)
GraphBuilder
true
retain the edge ids, if false
use internally generated edge ids.setRetainEdgeIds
in interface GraphBuilder<VID>
retainEdgeIds
- whether or not to retain edge idsdefault GraphChangeSet<VID> setRetainIds(boolean retainIds)
GraphBuilder
setRetainIds
in interface GraphBuilder<VID>
retainIds
- whether or not to retain vertex and edge idsGraphBuilder.setRetainEdgeIds(boolean)
, GraphBuilder.setRetainVertexIds(boolean)
default GraphChangeSet<VID> setRetainVertexIds(boolean retainVertexIds)
GraphBuilder
true
retain the vertex ids, if false
use internally generated vertex ids of type Integer
setRetainVertexIds
in interface GraphBuilder<VID>
retainVertexIds
- whether or not to retain vertex idsEdgeModifier<VID> updateEdge(long edgeId)
EdgeModifier
with which you can update edge properties and the edge label.edgeId
- the ID of the edge that should be updatedVertexModifier
instanceVertexModifier<VID> updateVertex(VID vertexId)
VertexModifier
with which you can update vertex properties. Throws an exception if the vertex has been removed with this graph change set before.vertexId
- the ID of the vertex that should be updatedVertexModifier
instance