Record Class Cohort

java.lang.Object
java.lang.Record
network.ike.workspace.Cohort
Record Components:
members - the release members in topological (upstream-first) order
decentralized - true when the members are sibling repositories with no common root (the foundation cascade); false for a single repo or a co-located workspace

public record Cohort(List<Cohort.Member> members, boolean decentralized) extends Record
A dependency-ordered set of release members — the scope an artifact / release-style workspace verb (release, align) acts on (IKE-Network/ike-issues#610, under the console/engine boundary, #601).

Where a WorkingSet is co-located checkouts in declaration order (for working-tree verbs), a cohort is topologically ordered — a member never precedes an upstream it depends on — and excludes the workspace aggregator root, which is not a released artifact. A cohort may also be decentralized: the foundation release cascade spans sibling repositories that share no common root, assembled from each project's release-cascade.yaml (modelled by ReleaseCascade).

Resolved from context by CohortResolver: a single repository is a cohort of one; a workspace.yaml is its subprojects in topological order.

  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final record 
    One release member of a Cohort.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Cohort(List<Cohort.Member> members, boolean decentralized)
    Creates an instance of a Cohort record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Returns the value of the decentralized record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    boolean
    Whether this cohort has no members.
    Returns the value of the members record component.
    int
    The number of release members in this cohort.
    final String
    Returns a string representation of this record class.

    Methods inherited from class Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • Cohort

      public Cohort(List<Cohort.Member> members, boolean decentralized)
      Creates an instance of a Cohort record class.
      Parameters:
      members - the value for the members record component
      decentralized - the value for the decentralized record component
  • Method Details

    • size

      public int size()
      The number of release members in this cohort.
      Returns:
      the member count
    • isEmpty

      public boolean isEmpty()
      Whether this cohort has no members.
      Returns:
      true if empty
    • 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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      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.
    • members

      public List<Cohort.Member> members()
      Returns the value of the members record component.
      Returns:
      the value of the members record component
    • decentralized

      public boolean decentralized()
      Returns the value of the decentralized record component.
      Returns:
      the value of the decentralized record component