Enum Class DiversityRating

java.lang.Object
java.lang.Enum<DiversityRating>
com.eqixiac.equinix.design.peering.enums.DiversityRating
All Implemented Interfaces:
Serializable, Comparable<DiversityRating>, Constable

public enum DiversityRating extends Enum<DiversityRating>
Rates the geographic diversity of failover paths for resiliency analysis.

Geographic diversity measures how independent two locations are in terms of shared failure domains (power grids, fiber routes, weather corridors, seismic zones). A backup in the same metro area provides minimal diversity, while a backup on a different continent provides maximum diversity.

Author:
ianjones
See Also:
  • Nested Class Summary

    Nested classes/interfaces inherited from class Enum

    Enum.EnumDesc<E>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    Under 150 km apart - effectively the same failure domain (same-metro pairings).
    3000 km or more apart - typically cross-region/continental (e.g.
    1500–2999 km apart - good diversity within a continent (e.g.
    500–1499 km apart - some shared infrastructure risk (e.g.
    150–499 km apart - limited diversity, likely shared corridors (e.g.
    The distance between the two metros could not be determined (no facility or Fabric metro coordinates were available for at least one of them).
  • Method Summary

    Modifier and Type
    Method
    Description
    fromDistance(double distanceKm)
    Rates geographic diversity based on the distance between two metros.
    Returns the enum constant of this class with the specified name.
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • EXCELLENT

      public static final DiversityRating EXCELLENT
      3000 km or more apart - typically cross-region/continental (e.g. Ashburn–Frankfurt). Score 1.0.
    • GOOD

      public static final DiversityRating GOOD
      1500–2999 km apart - good diversity within a continent (e.g. Ashburn–Dallas). Score 0.75.
    • MODERATE

      public static final DiversityRating MODERATE
      500–1499 km apart - some shared infrastructure risk (e.g. Ashburn–Chicago). Score 0.5.
    • POOR

      public static final DiversityRating POOR
      150–499 km apart - limited diversity, likely shared corridors (e.g. Ashburn–New York). Score 0.25.
    • CRITICAL

      public static final DiversityRating CRITICAL
      Under 150 km apart - effectively the same failure domain (same-metro pairings). Score 0.0.
    • UNKNOWN

      public static final DiversityRating UNKNOWN
      The distance between the two metros could not be determined (no facility or Fabric metro coordinates were available for at least one of them). This is an absence of data, not a proximity finding: it is never returned by fromDistance(double) and must be excluded from same-site detection and diversity scoring rather than treated as 0 km (which would falsely read as CRITICAL "same-site"). Its score is a placeholder and must not be averaged into a resiliency score.
  • Method Details

    • values

      public static DiversityRating[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static DiversityRating valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • fromDistance

      public static DiversityRating fromDistance(double distanceKm)
      Rates geographic diversity based on the distance between two metros.

      Only ever returns one of the five distance-based ratings; UNKNOWN is reserved for the caller to assign when the distance itself is unavailable and is never produced here.

      Parameters:
      distanceKm - the distance between primary and backup metros in kilometers
      Returns:
      the diversity rating for the given distance