Class EngineGraphClient
java.lang.Object
ai.pipestream.module.pipelineprobe.grpc.EngineGraphClient
gRPC client wrapper for engine pipeline-graph queries used by the pipeline-crawl
orchestrator. Uses the same
GrpcRetry + per-call deadline pattern as
GraphBinder and
AccountManager —
no MicroProfile @Timeout on blocking stubs (it does not cancel the
underlying gRPC call and left setup appearing hung for 30s with no SSE update).-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordOutcome ofgetOrCreateActiveGraph(PipelineGraph, String, String, String): the active graph's id and version, plus whether this call created it. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetOrCreateActiveGraph(ai.pipestream.config.v1.PipelineGraph graph, String graphId, String clusterId, String createdBy) Idempotent get-or-create for an active pipeline graph in a cluster.getOrCreateDatasourceInstance(String graphId, long graphVersion, String datasourceId, String entryNodeId, String createdBy) Idempotent get-or-create of the datasource-to-entry-node binding for a graph version.booleanisGraphCached(String graphId, long graphVersion) Returns true if the engine has the given graph version cached and ready to route to.voidrequireGraphCached(String graphId, long graphVersion) Asserts that the given graph version is cached on the engine, throwing if it is not (after the retry budget inisGraphCached(String, long)is spent).
-
Constructor Details
-
EngineGraphClient
public EngineGraphClient()Creates the engine pipeline-graph client. The gRPC stub is injected by the container; instances are managed by CDI.
-
-
Method Details
-
isGraphCached
Returns true if the engine has the given graph version cached and ready to route to.- Parameters:
graphId- the pipeline graph id to querygraphVersion- the graph version that must be the one the engine has active- Returns:
- true when the engine reports the graph found and its active
version equals
graphVersion; false otherwise
-
requireGraphCached
Asserts that the given graph version is cached on the engine, throwing if it is not (after the retry budget inisGraphCached(String, long)is spent).- Parameters:
graphId- the pipeline graph id that must be cachedgraphVersion- the graph version that must be active on the engine- Throws:
RuntimeException- if the graph version is not cached on the engine
-
getOrCreateActiveGraph
public EngineGraphClient.ActiveGraph getOrCreateActiveGraph(ai.pipestream.config.v1.PipelineGraph graph, String graphId, String clusterId, String createdBy) Idempotent get-or-create for an active pipeline graph in a cluster.- Parameters:
graph- the pipeline graph definition to activate when none is active yetgraphId- the graph id to look up / activate underclusterId- the cluster the graph is scoped tocreatedBy- audit identity recorded as the graph's creator- Returns:
- the active graph's id and version, with
createdindicating whether it was newly activated (true) or an existing one was reused (false)
-
getOrCreateDatasourceInstance
public String getOrCreateDatasourceInstance(String graphId, long graphVersion, String datasourceId, String entryNodeId, String createdBy) Idempotent get-or-create of the datasource-to-entry-node binding for a graph version. Lists the graph's existing datasource instances and reuses the one already bound todatasourceIdif present; otherwise creates a new binding from the datasource toentryNodeId.- Parameters:
graphId- the graph id the binding lives undergraphVersion- the graph version the binding lives underdatasourceId- the datasource to bindentryNodeId- the graph node the datasource feeds into when a new binding is createdcreatedBy- audit identity recorded as the binding's creator- Returns:
- the datasource instance id of the reused or newly created binding
- Throws:
RuntimeException- if creating the datasource instance reportssuccess=false
-