Class CascadeAssembler
java.lang.Object
network.ike.workspace.cascade.CascadeAssembler
Assembles the full IKE release cascade graph by traversing the
per-project
release-cascade.yaml manifests
(IKE-Network/ike-issues#420).
The cascade is a loosely-coupled distributed system: each
project version-controls only its own upstream/downstream
edges. This assembler starts from one project, follows every edge
to its neighbours (resolving each neighbour's manifest through a
caller-supplied CascadeAssembler.CascadeResolver), and stitches the result
into a single topologically ordered ReleaseCascade.
Two consistency rules are enforced during assembly:
- Edge reciprocity — if project A names B as
downstream, B must name A asupstream, and vice versa. A one-sided edge is a manifest error. - Acyclicity — the consume relation must be a DAG; a cycle has no release order.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceResolves theProjectCascadefor a cascade neighbour. -
Method Summary
Modifier and TypeMethodDescriptionstatic ReleaseCascadeassemble(CascadeEdge start, ProjectCascade startCascade, CascadeAssembler.CascadeResolver resolver) Assembles the cascade graph rooted at one known project, without populatingRepositoryKeyon the nodes.static ReleaseCascadeassemble(CascadeEdge start, ProjectCascade startCascade, CascadeAssembler.CascadeResolver resolver, RepositoryKeyResolver repositoryResolver) Assembles the cascade graph rooted at one known project, populating each node'sRepositoryKeyviarepositoryResolverwhen supplied (IKE-Network/ike-issues#496 part C).
-
Method Details
-
assemble
public static ReleaseCascade assemble(CascadeEdge start, ProjectCascade startCascade, CascadeAssembler.CascadeResolver resolver) Assembles the cascade graph rooted at one known project, without populatingRepositoryKeyon the nodes.- Parameters:
start- an edge identifying the starting project — its coordinates and locators (groupId,artifactId,repo,url);kindis unusedstartCascade- the starting project's already-parsed manifestresolver- resolves every other project's manifest- Returns:
- the assembled, topologically ordered cascade
- Throws:
IllegalArgumentException- if an edge is one-sided or the graph contains a cycle
-
assemble
public static ReleaseCascade assemble(CascadeEdge start, ProjectCascade startCascade, CascadeAssembler.CascadeResolver resolver, RepositoryKeyResolver repositoryResolver) Assembles the cascade graph rooted at one known project, populating each node'sRepositoryKeyviarepositoryResolverwhen supplied (IKE-Network/ike-issues#496 part C).- Parameters:
start- an identifying edge for the starting projectstartCascade- the starting project's parsed manifestresolver- resolves every other project's manifestrepositoryResolver- maps a coordinate to itsRepositoryKey; may benullto leave keys unset on the assembled nodes- Returns:
- the assembled, topologically ordered cascade
- Throws:
IllegalArgumentException- if an edge is one-sided or the graph contains a cycle
-