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.
|
EdgeBuilder<VID> |
addEdge(java.lang.String 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(java.lang.String 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. |
ChangeType |
getEdgeChangeType(java.lang.Object id)
Returns the
ChangeType of the update for the edge with the given ID |
ChangeType |
getVertexChangeType(VID id)
Returns the
ChangeType of the update for the vertex with the given ID |
GraphChangeSet<VID> |
removeEdge(long edgeId)
Removes an edge from the graph.
|
GraphChangeSet<VID> |
removeEdge(java.lang.String 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> |
resetEdge(java.lang.String 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. |
EdgeModifier<VID> |
updateEdge(java.lang.String 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, setDataSourceVersionEdgeBuilder<VID> addEdge(long edgeId, VertexBuilder<VID> srcVertex, VertexBuilder<VID> dstVertex)
UnsupportedOperationException if edge Id generation strategy
is set to AUTO_GENERATEDaddEdge in interface GraphBuilder<VID>edgeId - the ID of the new edgesrcVertex - a VertexBuilderImpl instance representing the source vertexdstVertex - a VertexBuilderImpl instance representing the destination vertexVertexBuilderImplEdgeBuilder<VID> addEdge(long edgeId, VID srcVertex, VID dstVertex)
Throws an 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 edgeEdgeBuilder<VID> addEdge(java.lang.String edgeId, VertexBuilder<VID> srcVertex, VertexBuilder<VID> dstVertex)
UnsupportedOperationException if edge Id generation strategy
is set to AUTO_GENERATEDaddEdge in interface GraphBuilder<VID>edgeId - the ID of the new edgesrcVertex - a VertexBuilderImpl instance representing the source vertexdstVertex - a VertexBuilderImpl instance representing the destination vertexVertexBuilderImplEdgeBuilder<VID> addEdge(java.lang.String edgeId, VID srcVertex, VID dstVertex)
Throws an 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_GENERATEDaddVertex in interface GraphBuilder<VID>VertexBuilder<VID> addVertex(VID vertexId)
UnsupportedOperationException if vertex Id generation strategy
is set to AUTO_GENERATEDaddVertex 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.ChangeType getEdgeChangeType(java.lang.Object id)
ChangeType of the update for the edge with the given IDid - the ID of the edge that should be referencedChangeType or null if the graph doesn't have an edge with the given IDChangeType getVertexChangeType(VID id)
ChangeType of the update for the vertex with the given IDid - the ID of the vertex that should be referencedChangeType or null if the graph doesn't have an vertex with the given IDGraphChangeSet<VID> removeEdge(long edgeId)
edgeId - the ID of the edge to be removedGraphChangeSet<VID> removeEdge(java.lang.String 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)
GraphBuilderresetEdge in interface GraphBuilder<VID>edgeId - the ID of the edge which should be resetGraphChangeSet<VID> resetEdge(java.lang.String edgeId)
GraphBuilderresetEdge in interface GraphBuilder<VID>edgeId - the ID of the edge which should be resetGraphChangeSet<VID> resetVertex(VertexBuilder<VID> vertex)
GraphBuilderresetVertex in interface GraphBuilder<VID>vertex - a VertexBuilderGraphChangeSet<VID> resetVertex(VID vertexId)
GraphBuilderresetVertex 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)
GraphBuildertrue 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)
GraphBuildersetRetainIds 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)
GraphBuildertrue retain the vertex ids, if false use internally generated vertex ids of type IntegersetRetainVertexIds 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 instanceEdgeModifier<VID> updateEdge(java.lang.String 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