Class SpeedOfLightLatency.Builder

java.lang.Object
com.eqixiac.equinix.design.geo.SpeedOfLightLatency.Builder
Enclosing class:
SpeedOfLightLatency

public static final class SpeedOfLightLatency.Builder extends Object
Fluent configuration for SpeedOfLightLatency.
Author:
ianjones
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • mode

      Sets the reporting mode. Unlike the other two setters, a null argument does not throw - it is silently ignored and the current mode (initially SpeedOfLightLatency.Mode.ROUND_TRIP) is kept.
      Parameters:
      mode - one-way or round-trip; null is ignored
      Returns:
      this builder
    • refractiveIndex

      public SpeedOfLightLatency.Builder refractiveIndex(double refractiveIndex)
      Sets the fibre refractive index. Only > 0 is enforced; note that values below 1.0 are physically meaningless for fibre (they yield a floor faster than light in vacuum) - real single-mode fibre is ~1.467, and meaningful values are >= 1.0.
      Parameters:
      refractiveIndex - the fibre refractive index (must be > 0); defaults to 1.467
      Returns:
      this builder
      Throws:
      IllegalArgumentException - if refractiveIndex <= 0 or it is NaN or infinite
    • routeFactor

      public SpeedOfLightLatency.Builder routeFactor(double routeFactor)
      Sets the path inflation applied to the great-circle distance: 1.0 is the theoretical straight-line floor; ~1.3–1.5 models realistic terrestrial fibre routing.
      Parameters:
      routeFactor - path inflation over the great-circle distance (must be >= 1.0); defaults to 1.0
      Returns:
      this builder
      Throws:
      IllegalArgumentException - if routeFactor < 1.0 or it is NaN or infinite
    • build

      public SpeedOfLightLatency build()
      Builds the immutable calculator with the configured mode, refractive index, and route factor.
      Returns:
      a new SpeedOfLightLatency