Class SpeedOfLightLatency.Builder
java.lang.Object
com.eqixiac.equinix.design.geo.SpeedOfLightLatency.Builder
- Enclosing class:
SpeedOfLightLatency
Fluent configuration for
SpeedOfLightLatency.- Author:
- ianjones
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the immutable calculator with the configured mode, refractive index, and route factor.mode(SpeedOfLightLatency.Mode mode) Sets the reporting mode.refractiveIndex(double refractiveIndex) Sets the fibre refractive index.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.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
mode
Sets the reporting mode. Unlike the other two setters, anullargument does not throw - it is silently ignored and the current mode (initiallySpeedOfLightLatency.Mode.ROUND_TRIP) is kept.- Parameters:
mode- one-way or round-trip;nullis ignored- Returns:
- this builder
-
refractiveIndex
Sets the fibre refractive index. Only> 0is 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- ifrefractiveIndex <= 0or it is NaN or infinite
-
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- ifrouteFactor < 1.0or it is NaN or infinite
-
build
Builds the immutable calculator with the configured mode, refractive index, and route factor.- Returns:
- a new
SpeedOfLightLatency
-