Record Class ReconcilerOptions

java.lang.Object
java.lang.Record
network.ike.plugin.ws.reconcile.ReconcilerOptions
Record Components:
rawFlags - map of flag-name → string value (already extracted from Maven system properties by the calling Mojo)

public record ReconcilerOptions(Map<String,String> rawFlags) extends Record
Flag bag passed through WorkspaceContext to reconcilers. Backs the convergence-pattern flag scheme defined in IKE-Network/ike-issues#393:
  • Default (no flag): reconcile to latest.
  • Opt out: -D<optOutFlag>=false — skip this reconciler entirely.
  • Pin: -D<pinFlag>=<value> — force a specific value rather than the latest discovered automatically.
  • Constructor Details

    • ReconcilerOptions

      public ReconcilerOptions(Map<String,String> rawFlags)
      Creates an instance of a ReconcilerOptions record class.
      Parameters:
      rawFlags - the value for the rawFlags record component
  • Method Details

    • isOptedOut

      public boolean isOptedOut(String flag)
      Parameters:
      flag - flag name (without -D prefix)
      Returns:
      true if the flag is present with value "false"
    • pin

      public Optional<String> pin(String flag)
      Parameters:
      flag - pin-flag name (without -D prefix)
      Returns:
      the pinned value, or empty if no pin was provided
    • empty

      public static ReconcilerOptions empty()
      Returns:
      an options bag with no flags set
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • rawFlags

      public Map<String,String> rawFlags()
      Returns the value of the rawFlags record component.
      Returns:
      the value of the rawFlags record component