Class GraphBinder
java.lang.Object
ai.pipestream.module.pipelineprobe.pipelinecrawl.GraphBinder
Binds a datasource to an active graph at its entry node, returning the
datasource-instance id directly. Idempotent: if an instance for this
datasource already exists on the graph, return its id; otherwise create
one and return that.
Wiring: quarkus.grpc.clients.engine.* +
quarkus.stork."engine".* in application.properties.
Two sequential blocking gRPC calls (list-then-create-if-not-found), both on the same blocking stub. Caller MUST be on a virtual thread.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbindDatasourceToGraph(String graphId, long graphVersion, String datasourceId, String entryNodeId) BinddatasourceIdtographIdatentryNodeId.
-
Constructor Details
-
GraphBinder
public GraphBinder()Creates the graph binder. Managed by CDI.
-
-
Method Details
-
bindDatasourceToGraph
public String bindDatasourceToGraph(String graphId, long graphVersion, String datasourceId, String entryNodeId) BinddatasourceIdtographIdatentryNodeId. Returns the datasource-instance id (existing or new).- Parameters:
graphId- the id of the active graph to bind the datasource tographVersion- the version of the graph to look up and create againstdatasourceId- the id of the datasource to bind; reused if an instance for it already exists on the graphentryNodeId- the entry node at which a newly created instance is bound- Returns:
- the datasource-instance id, reused if one already exists else newly created
- Throws:
IllegalStateException- if the engine reports CreateDatasourceInstance success=false
-