Class ServiceProfileOption

java.lang.Object
com.eqixiac.equinix.design.optimizer.model.ServiceProfileOption

public class ServiceProfileOption extends Object
One candidate Fabric service profile for a given (provider, metro), carrying the bandwidth capability the deployment wizard needs to pick a profile that can actually carry a connection's speed.

A provider legitimately publishes several service profiles at the same metro (a hosted Direct-Connect profile capped at 500 Mbps and a dedicated profile that lists 1G/10G/100G, for example). The optimizer resolves a single outranks winner for scoring and region preference, but that winner is chosen with zero knowledge of the connection's eventual bandwidth - so a hosted profile can win for a metro and then be paired with a 3000 Mbps connection it cannot build. To let the wizard choose a covering profile once the bandwidth is known, EVERY matching profile's capability for the metro is carried forward as one of these options.

The covers(int) rule mirrors the Layer-1 validator (PlanValidator.checkProfile) bit-for-bit, so a profile the selector accepts is exactly a profile the validator will not reject, and vice-versa: the per-metro ceiling (vcBandwidthMax) must not be exceeded, AND the bandwidth must be one of the discrete supportedBandwidths tiers - unless the profile allowCustomBandwidth allows custom bandwidth or publishes no discrete tier list at all, either of which lifts the discrete-tier constraint.

covers(int) answers the exact question ("can this profile build a VC at exactly this speed?"). Bandwidth round-up - the owner's rule that a requirement with no exact tier selects the smallest tier that satisfies it (3000 → 5000, never an error) - is a separate primitive, coveringTier(int): the smallest thing this profile can actually build that is not below the requirement. The wizard stamps the connection at that covering tier (which covers() then accepts exactly), so the round-up selection and the Layer-1 tier check stay in agreement. covers() is deliberately left exact so it keeps mirroring checkProfile.

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    The coveringTier(int) sentinel returned when a profile cannot build the requested bandwidth even after rounding up - the requirement exceeds its largest tier (and its per-metro ceiling).
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    canCover(int mbps)
    Whether this profile can carry the requested bandwidth after rounding up - i.e. whether coveringTier(int) finds a satisfying tier.
    int
    A capacity yardstick for "smallest-capable-first" selection: the largest discrete tier this profile publishes, or - for a custom-bandwidth/tierless profile - its per-metro ceiling, or Integer.MAX_VALUE when it is unbounded.
    int
    coveringTier(int mbps)
    The smallest bandwidth this profile can actually build that satisfies (is not below) the requested speed - the bandwidth round-up primitive.
    boolean
    covers(int mbps)
    Whether this profile can carry a connection of the given bandwidth, applying the SAME rule as PlanValidator.checkProfile so the selector and the Layer-1 validator agree exactly: the per-metro ceiling must not be exceeded, and the bandwidth must be an allowed discrete tier unless custom bandwidth is allowed or no tier list is published.
    int
    excessTiersAbove(int mbps)
    How many discrete tiers this profile publishes strictly above mbps - the tie-break for two profiles with the same capacityCeiling(): the fewer wasted tiers, the tighter.
    int
    The largest bandwidth this profile can build in Mbps - its largest published tier clamped to the per-metro ceiling, the ceiling itself for a custom/tierless profile, or Integer.MAX_VALUE when it is unbounded.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • NO_COVERING_TIER

      public static final int NO_COVERING_TIER
      The coveringTier(int) sentinel returned when a profile cannot build the requested bandwidth even after rounding up - the requirement exceeds its largest tier (and its per-metro ceiling). Chosen negative so it sorts below every real tier in a smallest-fit comparator.
      See Also:
  • Constructor Details

    • ServiceProfileOption

      public ServiceProfileOption()
  • Method Details

    • covers

      public boolean covers(int mbps)
      Whether this profile can carry a connection of the given bandwidth, applying the SAME rule as PlanValidator.checkProfile so the selector and the Layer-1 validator agree exactly: the per-metro ceiling must not be exceeded, and the bandwidth must be an allowed discrete tier unless custom bandwidth is allowed or no tier list is published.
      Parameters:
      mbps - the requested connection bandwidth in Mbps
      Returns:
      true when a connection of mbps is buildable on this profile
    • coveringTier

      public int coveringTier(int mbps)
      The smallest bandwidth this profile can actually build that satisfies (is not below) the requested speed - the bandwidth round-up primitive. This is what the wizard stamps the connection at when the exact requirement is not an offered tier:
      • a discrete-tier profile returns its smallest published tier >= mbps (so 3000 against [1000, 5000, 10000] returns 5000);
      • a custom-bandwidth (allowCustomBandwidth) or tierless profile returns mbps itself - the exact speed is buildable, so nothing is rounded;
      • in either case the result is clamped to the per-metro ceiling (vcBandwidthMax): a tier above the ceiling is not selectable.
      Returns NO_COVERING_TIER when even rounding up cannot satisfy the requirement (it exceeds the largest tier this profile publishes and its ceiling). Because the returned tier is always one covers(int) accepts exactly, stamping the connection at it keeps the selector and the Layer-1 validator in agreement.
      Parameters:
      mbps - the requested connection bandwidth in Mbps
      Returns:
      the smallest satisfying tier in Mbps, or NO_COVERING_TIER if none exists
    • canCover

      public boolean canCover(int mbps)
      Whether this profile can carry the requested bandwidth after rounding up - i.e. whether coveringTier(int) finds a satisfying tier. Distinct from covers(int), which is the exact-tier test: a 3000 Mbps request has covers()==false but canCover()==true on a profile publishing a 5000 Mbps tier.
      Parameters:
      mbps - the requested connection bandwidth in Mbps
      Returns:
      true when a satisfying tier exists (exact or rounded up)
    • maxCoverableMbps

      public int maxCoverableMbps()
      The largest bandwidth this profile can build in Mbps - its largest published tier clamped to the per-metro ceiling, the ceiling itself for a custom/tierless profile, or Integer.MAX_VALUE when it is unbounded. Used to phrase the "requirement exceeds every profile" error with the real maximum a customer could ask for instead.
      Returns:
      the largest buildable bandwidth in Mbps
    • capacityCeiling

      public int capacityCeiling()
      A capacity yardstick for "smallest-capable-first" selection: the largest discrete tier this profile publishes, or - for a custom-bandwidth/tierless profile - its per-metro ceiling, or Integer.MAX_VALUE when it is unbounded. A smaller value is a tighter fit, so a request both a hosted ([50..500]) and a dedicated profile could carry prefers the hosted one.
      Returns:
      the profile's effective capacity ceiling in Mbps
    • excessTiersAbove

      public int excessTiersAbove(int mbps)
      How many discrete tiers this profile publishes strictly above mbps - the tie-break for two profiles with the same capacityCeiling(): the fewer wasted tiers, the tighter.
      Parameters:
      mbps - the requested connection bandwidth in Mbps
      Returns:
      the count of published tiers greater than mbps