VID
- the vertex ID typepublic class GraphBuilderImpl<VID> extends oracle.pgx.api.internal.ApiObject implements GraphBuilder<VID>
PgxGraph
.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(VertexBuilder<VID> srcVertex, VertexBuilder<VID> dstVertex)
Adds an edge with an implicit ID and the given source and destination vertices.
|
EdgeBuilder<VID> |
addEdge(VID srcVertex, VID dstVertex)
Adds an edge with an implicit ID and the given source and destination vertices.
|
VertexBuilder<VID> |
addVertex()
Adds a vertex with an implicit id to the graph builder.
|
VertexBuilder<VID> |
addVertex(VID vertexId)
Adds the vertex with the given id to the graph builder.
|
PgxGraph |
build()
Blocking version of
GraphBuilder.buildAsync() . |
PgxGraph |
build(java.lang.String newGraphName)
Blocking version of
GraphBuilder.buildAsync(String) . |
PgxFuture<PgxGraph> |
buildAsync()
Shortcut for
GraphBuilder.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
|
PgxSession |
getSession()
Gets the session.
|
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
|
void |
setDataSourceVersion(java.lang.String version)
Sets the version information for the built graph or snapshot
|
java.lang.String |
toString() |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
setRetainEdgeIds, setRetainIds, setRetainVertexIds
public EdgeBuilder<VID> addEdge(long edgeId, VertexBuilder<VID> srcVertex, VertexBuilder<VID> dstVertex)
GraphBuilder
UnsupportedOperationException
if edge Id generation strategy is set to IdGenerationStrategy.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
public EdgeBuilder<VID> addEdge(long edgeId, VID srcVertex, VID dstVertex)
GraphBuilder
UnsupportedOperationException
if edge Id generation strategy is set to IdGenerationStrategy.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 edgepublic EdgeBuilder<VID> addEdge(VertexBuilder<VID> srcVertex, VertexBuilder<VID> dstVertex)
GraphBuilder
UnsupportedOperationException
if edge Id generation strategy is set to IdGenerationStrategy.USER_IDS
addEdge
in interface GraphBuilder<VID>
srcVertex
- a VertexBuilderImpl
instance representing the source vertexdstVertex
- a VertexBuilderImpl
instance representing the destination vertexVertexBuilderImpl
public EdgeBuilder<VID> addEdge(VID srcVertex, VID dstVertex)
GraphBuilder
UnsupportedOperationException
if edge Id generation strategy is set to IdGenerationStrategy.USER_IDS
addEdge
in interface GraphBuilder<VID>
srcVertex
- the source ID of the new edgedstVertex
- the destination ID of the new edgepublic VertexBuilder<VID> addVertex()
GraphBuilder
UnsupportedOperationException
if vertex Id generation strategy is set to IdGenerationStrategy.USER_IDS
addVertex
in interface GraphBuilder<VID>
public VertexBuilder<VID> addVertex(VID vertexId)
GraphBuilder
UnsupportedOperationException
if vertex Id generation strategy is set to IdGenerationStrategy.AUTO_GENERATED
addVertex
in interface GraphBuilder<VID>
vertexId
- the ID of the new vertexpublic final PgxGraph build() throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
GraphBuilder
GraphBuilder.buildAsync()
. Calls GraphBuilder.buildAsync()
and waits for the returned PgxFuture
to complete.build
in interface GraphBuilder<VID>
java.util.concurrent.ExecutionException
- if any exception occurred during asynchronous execution. The actual exception will be nested.java.lang.InterruptedException
- if the caller thread gets interrupted while waiting for completion.public final PgxGraph build(java.lang.String newGraphName) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
GraphBuilder
GraphBuilder.buildAsync(String)
. Calls GraphBuilder.buildAsync(String)
and waits for the returned PgxFuture
to complete.build
in interface GraphBuilder<VID>
java.util.concurrent.ExecutionException
- if any exception occurred during asynchronous execution. The actual exception will be nested.java.lang.InterruptedException
- if the caller thread gets interrupted while waiting for completion.public final PgxFuture<PgxGraph> buildAsync()
GraphBuilder
GraphBuilder.buildAsync(String)
without a namebuildAsync
in interface GraphBuilder<VID>
public final PgxFuture<PgxGraph> buildAsync(java.lang.String newGraphName)
GraphBuilder
buildAsync
in interface GraphBuilder<VID>
newGraphName
- the new name of the graph. If null
a name is generatedpublic java.lang.Object getConfigParameter(GraphBuilderConfig.Field parameter)
GraphBuilder
getConfigParameter
in interface GraphBuilder<VID>
parameter
- the config parameter to get the value forpublic final PgxSession getSession()
public GraphBuilder<VID> resetEdge(long edgeId)
GraphBuilder
resetEdge
in interface GraphBuilder<VID>
edgeId
- the ID of the edge which should be resetpublic GraphBuilder<VID> resetVertex(VertexBuilder<VID> vertex)
GraphBuilder
resetVertex
in interface GraphBuilder<VID>
vertex
- a VertexBuilder
public GraphBuilder<VID> resetVertex(VID vertexId)
GraphBuilder
resetVertex
in interface GraphBuilder<VID>
vertexId
- the ID of the vertex which should be resetpublic void setConfigParameter(GraphBuilderConfig.Field parameter, java.lang.Object value)
GraphBuilder
setConfigParameter
in interface GraphBuilder<VID>
parameter
- the config parameter to setvalue
- the new value for the config parameterpublic void setDataSourceVersion(java.lang.String version)
GraphBuilder
setDataSourceVersion
in interface GraphBuilder<VID>
version
- the version informationpublic java.lang.String toString()
toString
in class java.lang.Object