Class PeeringIntelligence.Builder

java.lang.Object
com.eqixiac.equinix.design.peering.PeeringIntelligence.Builder
Enclosing class:
PeeringIntelligence

public static class PeeringIntelligence.Builder extends Object
Fluent builder for configuring and executing a peering intelligence analysis.

The builder collects target ASNs (with optional labels), customer metro locations, the customer's own ASN, and analysis options. Calling analyze() executes the analysis pipeline and returns a PeeringIntelligenceResult.

Author:
ianjones
  • Method Details

    • addAsn

      public PeeringIntelligence.Builder addAsn(long asn, String label)
      Adds a target ASN to analyze with a human-readable label.
      Parameters:
      asn - the autonomous system number (e.g., 16509 for AWS)
      label - a short label for display (e.g., "AWS")
      Returns:
      this builder
    • addAsn

      public PeeringIntelligence.Builder addAsn(long asn)
      Adds a target ASN to analyze using the PeeringDB network name as label.
      Parameters:
      asn - the autonomous system number
      Returns:
      this builder
    • addAsns

      public PeeringIntelligence.Builder addAsns(Map<Long,String> asns)
      Adds multiple ASNs from a map of ASN to label.
      Parameters:
      asns - map of ASN -> label
      Returns:
      this builder
    • customerMetros

      public PeeringIntelligence.Builder customerMetros(MetroCode... metros)
      Sets the customer's metro locations for resiliency analysis.

      When customer metros are specified, the engine performs blast radius analysis and failover path identification for each metro.

      Parameters:
      metros - the customer's Equinix metro locations
      Returns:
      this builder
    • customerMetros

      public PeeringIntelligence.Builder customerMetros(MetroId... metros)
      Sets the customer's metro locations by MetroId - accepts metros not in the MetroCode enum (e.g. one added to Fabric after this SDK was built).
      Parameters:
      metros - the customer's Equinix metro locations
      Returns:
      this builder
    • customerMetros

      public PeeringIntelligence.Builder customerMetros(String... metros)
      Sets the customer's metro locations by metro code string (e.g. "DC", "da"). Accepts metros not in the MetroCode enum.
      Parameters:
      metros - the customer's Equinix metro codes
      Returns:
      this builder
    • customerMetros

      public PeeringIntelligence.Builder customerMetros(Collection<MetroCode> metros)
      Sets the customer's metro locations from a collection of MetroCode.
      Parameters:
      metros - the customer's Equinix metro locations
      Returns:
      this builder
    • customerAsn

      public PeeringIntelligence.Builder customerAsn(long asn)
      Sets the customer's own ASN for mutual peering opportunity discovery.

      When provided, the engine queries PeeringDB for the customer's IX presence and identifies Equinix IXes where both the customer and a target ASN are connected - one opportunity per (target ASN, IX). PeeringDB records IX membership only, so an opportunity means mutual presence; whether the two networks already peer there cannot be determined from this data.

      Parameters:
      asn - the customer's autonomous system number
      Returns:
      this builder
    • includeCapacity

      public PeeringIntelligence.Builder includeCapacity(boolean include)
      Enables or disables IX port capacity analysis. Enabled by default.
      Parameters:
      include - true to include port speed data from PeeringDB
      Returns:
      this builder
    • includePolicies

      public PeeringIntelligence.Builder includePolicies(boolean include)
      Enables or disables peering policy feasibility analysis. Enabled by default.
      Parameters:
      include - true to include policy data from PeeringDB
      Returns:
      this builder
    • includeResiliency

      public PeeringIntelligence.Builder includeResiliency(boolean include)
      Enables resiliency analysis (blast radius, correlated failures, failover paths).

      Requires customerMetros(MetroCode...) to have been called with at least one metro. Without customer metros, there is no context for evaluating failure impact.

      Parameters:
      include - true to perform resiliency analysis
      Returns:
      this builder
    • includeAll

      public PeeringIntelligence.Builder includeAll()
      Enables every analysis feature the engine actually performs: IX port-capacity analysis, peering-policy analysis, and resiliency analysis. (Capacity and policies are already on by default; this method additionally turns on the default-off resiliency analysis, which also requires at least one customer metro.)
      Returns:
      this builder
    • analyze

      public PeeringIntelligenceResult analyze()
      Executes the peering intelligence analysis.

      This method makes live API calls to PeeringDB (and optionally the Equinix Fabric API) to collect network presence data, then runs the analysis pipeline to produce the result.

      Returns:
      the complete analysis result
      Throws:
      IllegalStateException - if no target ASNs have been specified
      RuntimeException - if PeeringDB API calls fail