Record Class LiveState

java.lang.Object
java.lang.Record
com.eqixiac.equinix.design.plan.LiveState
Record Components:
routers - Cloud Routers in the plan's scope
connections - connections in the plan's scope
routingProtocols - routing protocols by parent connection uuid (read only for connections matched to the plan)
notes - what could not be read and why (for example a 403 on one connection's protocols)
readAt - when the snapshot was taken

public record LiveState(List<LiveRouter> routers, List<LiveConnection> connections, Map<String, List<LiveRoutingProtocol>> routingProtocols, List<String> notes, Instant readAt) extends Record
A snapshot of the live Fabric resources relevant to one plan, as LiveStateReader read them (or as a test builds them). Plain data, so drift detection is a pure function of plan and snapshot.
  • Constructor Details

  • Method Details

    • empty

      public static LiveState empty()
      An empty snapshot (nothing exists).
      Returns:
      an empty state
    • protocolsOf

      public List<LiveRoutingProtocol> protocolsOf(String connectionUuid)
      The routing protocols read for a connection.
      Parameters:
      connectionUuid - the connection uuid
      Returns:
      the protocols, empty when none were read
    • 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.
    • routers

      public List<LiveRouter> routers()
      Returns the value of the routers record component.
      Returns:
      the value of the routers record component
    • connections

      public List<LiveConnection> connections()
      Returns the value of the connections record component.
      Returns:
      the value of the connections record component
    • routingProtocols

      public Map<String, List<LiveRoutingProtocol>> routingProtocols()
      Returns the value of the routingProtocols record component.
      Returns:
      the value of the routingProtocols record component
    • notes

      public List<String> notes()
      Returns the value of the notes record component.
      Returns:
      the value of the notes record component
    • readAt

      public Instant readAt()
      Returns the value of the readAt record component.
      Returns:
      the value of the readAt record component