Record Class LiveState
java.lang.Object
java.lang.Record
com.eqixiac.equinix.design.plan.LiveState
- Record Components:
routers- Cloud Routers in the plan's scopeconnections- connections in the plan's scoperoutingProtocols- 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 Summary
ConstructorsConstructorDescriptionLiveState(List<LiveRouter> routers, List<LiveConnection> connections, Map<String, List<LiveRoutingProtocol>> routingProtocols, List<String> notes, Instant readAt) Makes every collection immutable and non-null. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theconnectionsrecord component.static LiveStateempty()An empty snapshot (nothing exists).final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.notes()Returns the value of thenotesrecord component.protocolsOf(String connectionUuid) The routing protocols read for a connection.readAt()Returns the value of thereadAtrecord component.routers()Returns the value of theroutersrecord component.Returns the value of theroutingProtocolsrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
LiveState
public LiveState(List<LiveRouter> routers, List<LiveConnection> connections, Map<String, List<LiveRoutingProtocol>> routingProtocols, List<String> notes, Instant readAt) Makes every collection immutable and non-null.
-
-
Method Details
-
empty
-
protocolsOf
The routing protocols read for a connection.- Parameters:
connectionUuid- the connection uuid- Returns:
- the protocols, empty when none were read
-
toString
-
hashCode
-
equals
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 withObjects::equals(Object,Object). -
routers
-
connections
Returns the value of theconnectionsrecord component.- Returns:
- the value of the
connectionsrecord component
-
routingProtocols
Returns the value of theroutingProtocolsrecord component.- Returns:
- the value of the
routingProtocolsrecord component
-
notes
-
readAt
-