Package org.acemq.amqp.api
Class TopologyPlan
java.lang.Object
org.acemq.amqp.api.TopologyPlan
What applying a
Topology would do, worked out before anything is done.
The point of producing this rather than simply declaring is that it can be read. Declaring blindly is how a topology change reaches production unreviewed and fails there; a plan can be printed in a build log, attached to a pull request, or refused.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classOne item of a plan.static enumWhat a plan proposes to do about one item. -
Method Summary
Modifier and TypeMethodDescriptionactions()changes()drift()booleanbooleanhasDrift()static TopologyPlanof(List<TopologyPlan.Action> actions) render()Renders the plan the way a build log or a review wants to read it.toString()
-
Method Details
-
of
- Parameters:
actions- what the plan proposes, in the order it would be carried out- Returns:
- the plan
-
actions
-
changes
- Returns:
- only the actions that would change the broker
-
drift
- Returns:
- the items that exist but do not match. Separate from
changes()because applying the plan will not fix them: AMQP forbids changing these settings in place, so every one of these is a decision for a person
-
hasDrift
public boolean hasDrift()- Returns:
- whether anything exists with settings the topology disagrees with
-
hasChanges
public boolean hasChanges()- Returns:
- whether applying this plan would change anything
-
render
Renders the plan the way a build log or a review wants to read it.- Returns:
- a human-readable, line-per-action rendering
-
toString
-