Class GraphBinder

java.lang.Object
ai.pipestream.module.pipelineprobe.pipelinecrawl.GraphBinder

@ApplicationScoped public class GraphBinder extends Object
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 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)
      Bind datasourceId to graphId at entryNodeId. Returns the datasource-instance id (existing or new).
      Parameters:
      graphId - the id of the active graph to bind the datasource to
      graphVersion - the version of the graph to look up and create against
      datasourceId - the id of the datasource to bind; reused if an instance for it already exists on the graph
      entryNodeId - 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