public interface 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(VID vertexId)
Adds the vertex with the given id to the graph builder.
|
PgxGraph |
build()
Blocking version of
buildAsync() . |
PgxGraph |
build(java.lang.String newGraphName)
Blocking version of
buildAsync(String) . |
PgxFuture<PgxGraph> |
buildAsync()
Shortcut for
buildAsync(String) without a name |
PgxFuture<PgxGraph> |
buildAsync(java.lang.String newGraphName)
Builds a new graph out of the changes in this graph builder
|
java.lang.Object |
getConfigParameter(GraphBuilderConfig.Field parameter)
Retrieve the value for the given config parameter
|
GraphBuilder<VID> |
resetEdge(long edgeId)
Resets any change for the edge with the given ID.
|
GraphBuilder<VID> |
resetVertex(VertexBuilder<VID> vertex)
Resets any change for the given vertex.
|
GraphBuilder<VID> |
resetVertex(VID vertexId)
Resets any change for the vertex with the given ID.
|
void |
setConfigParameter(GraphBuilderConfig.Field parameter, java.lang.Object value)
Set the given configuration parameter to the given value
|
default GraphBuilder<VID> |
setRetainEdgeIds(boolean retainEdgeIds)
Controls whether the edge ids provided in this graph builder are to be retained in the final graph.
|
default GraphBuilder<VID> |
setRetainIds(boolean retainIds)
Controls for both vertex and edge ids whether to retain them in the final graph.
|
default GraphBuilder<VID> |
setRetainVertexIds(boolean retainVertexIds)
Controls whether to retain the vertex ids provided in this graph builder are to be retained in the final graph.
|
EdgeBuilder<VID> addEdge(long edgeId, VertexBuilder<VID> srcVertex, VertexBuilder<VID> dstVertex)
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)
edgeId
- the ID of the new edgesrcVertex
- the source ID of the new edgedstVertex
- the destination ID of the new edgeVertexBuilder<VID> addVertex(VID vertexId)
vertexId
- the ID of the new vertexPgxGraph build() throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
buildAsync()
. Calls buildAsync()
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.PgxGraph build(java.lang.String newGraphName) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
buildAsync(String)
. Calls buildAsync(String)
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> buildAsync()
buildAsync(String)
without a namePgxFuture<PgxGraph> buildAsync(java.lang.String newGraphName)
newGraphName
- the new name of the graph. If null
a name is generatedjava.lang.Object getConfigParameter(GraphBuilderConfig.Field parameter)
parameter
- the config parameter to get the value forGraphBuilder<VID> resetEdge(long edgeId)
edgeId
- the ID of the edge which should be resetGraphBuilder<VID> resetVertex(VertexBuilder<VID> vertex)
vertex
- a VertexBuilder
GraphBuilder<VID> resetVertex(VID vertexId)
vertexId
- the ID of the vertex which should be resetvoid setConfigParameter(GraphBuilderConfig.Field parameter, java.lang.Object value)
parameter
- the config parameter to setvalue
- the new value for the config parameterdefault GraphBuilder<VID> setRetainEdgeIds(boolean retainEdgeIds)
true
retain the edge ids, if false
use internally generated edge ids.retainEdgeIds
- whether or not to retain edge idsdefault GraphBuilder<VID> setRetainIds(boolean retainIds)
retainIds
- whether or not to retain vertex and edge idssetRetainEdgeIds(boolean)
, setRetainVertexIds(boolean)
default GraphBuilder<VID> setRetainVertexIds(boolean retainVertexIds)
true
retain the vertex ids, if false
use internally generated vertex ids of type Integer
retainVertexIds
- whether or not to retain vertex idsCopyright © 2016, 2018 Oracle and/or its affiliates. All Rights Reserved.