Class PresenceMatrix

java.lang.Object
com.eqixiac.equinix.design.peering.model.PresenceMatrix

public class PresenceMatrix extends Object
A two-dimensional matrix of ASN presence across Equinix metros.

Rows represent target ASNs; columns represent Equinix metros. Each cell is a PresenceCell containing rich connectivity data (IX peering, Fabric availability, port capacity, route server participation). The matrix supports both ASN-centric views ("where is AWS present?") and metro-centric views ("who is present in DC?").

Output Formats

Author:
ianjones
See Also:
  • Constructor Details

    • PresenceMatrix

      public PresenceMatrix()
  • Method Details

    • get

      public PresenceCell get(long asn, MetroId metro)
      Gets the cell for a specific ASN at a specific metro.
      Parameters:
      asn - the autonomous system number
      metro - the Equinix metro code
      Returns:
      the presence cell, or null if the combination is not in the matrix
    • forAsn

      public Map<MetroId, PresenceCell> forAsn(long asn)
      Returns all cells for a given ASN (row view).
      Parameters:
      asn - the autonomous system number
      Returns:
      map of metro -> cell for this ASN, or empty map
    • forMetro

      public Map<Long, PresenceCell> forMetro(MetroId metro)
      Returns all cells for a given metro (column view).
      Parameters:
      metro - the Equinix metro code
      Returns:
      map of ASN -> cell for this metro
    • metrosWithAllAsns

      public List<MetroId> metrosWithAllAsns(Collection<Long> targetAsns)
      Returns metros where ALL specified ASNs have IX peering presence.
      Parameters:
      targetAsns - the ASNs that must all be present
      Returns:
      list of metros where all target ASNs peer at Equinix IXes
    • metrosWithAnyAsn

      public List<MetroId> metrosWithAnyAsn(Collection<Long> targetAsns)
      Returns metros where ANY of the specified ASNs have IX peering presence.
      Parameters:
      targetAsns - the ASNs to check
      Returns:
      list of metros where at least one target ASN peers at an Equinix IX
    • asnCountByMetro

      public Map<MetroId,Integer> asnCountByMetro()
      Counts how many of the target ASNs have IX peering at each metro.
      Returns:
      map of metro -> count of ASNs with IX presence
    • toTableString

      public String toTableString()
      Renders the matrix as a compact ASCII table.
      Returns:
      formatted ASCII table with ASNs as rows and metros as columns
    • toDetailedTableString

      public String toDetailedTableString()
      Renders the matrix as a detailed ASCII table with capacity annotations.
      Returns:
      formatted ASCII table with capacity and route server indicators
    • toMarkdown

      public String toMarkdown()
      Renders the matrix as a Markdown table.
      Returns:
      Markdown-formatted table