Interface DesignContext
- All Known Implementing Classes:
CatalogDesignContext
public interface DesignContext
The read-only facts of one design run. An engine gathers them once (from the live Fabric
catalogue, the rate cards and the spec) and hands the same context to every plug-in, so plug-ins
never perform I/O and a run is reproducible from its context.
All latencies are round-trip milliseconds, the unit of Fabric's measured
connectedMetros.avgLatency. An empty result means unknown, never zero.
-
Method Summary
Modifier and TypeMethodDescriptionasOf()booleanlatencyMeasured(MetroId metro, SiteIntent site) metros()reachableClouds(MetroId metro) roundTripLatencyMs(MetroId a, MetroId b) Round-trip latency between two metros, measured where Fabric publishes it and estimated otherwise.roundTripLatencyMs(MetroId metro, SiteIntent site) Round-trip latency between a metro and a site: Fabric's measurement when the site names a metro and the pair is measured, otherwise an estimate from distance, otherwise unknown.doublesiteWeight(SiteIntent site) spec()
-
Method Details
-
spec
DesignSpec spec()- Returns:
- the design being evaluated
-
metros
List<MetroFacts> metros()- Returns:
- every metro the catalogue returned, in a stable order (by code)
-
metro
- Parameters:
metro- a metro- Returns:
- its facts, or empty when the catalogue does not list it
-
roundTripLatencyMs
Round-trip latency between a metro and a site: Fabric's measurement when the site names a metro and the pair is measured, otherwise an estimate from distance, otherwise unknown.- Parameters:
metro- a metrosite- a site of the spec- Returns:
- the latency in ms, or empty when it is unknown
-
latencyMeasured
- Parameters:
metro- a metrosite- a site of the spec- Returns:
truewhenroundTripLatencyMs(MetroId, SiteIntent)is a Fabric measurement,falsewhen it is an estimate or unknown
-
roundTripLatencyMs
Round-trip latency between two metros, measured where Fabric publishes it and estimated otherwise.- Parameters:
a- one metrob- the other metro- Returns:
- the latency in ms, or empty when it is unknown
-
siteWeight
- Parameters:
site- a site of the spec- Returns:
- the site's share of the total site weight, between 0 and 1 (weights sum to 1 across sites)
-
reachableClouds
-
costModel
CostModel costModel()- Returns:
- the cost model that prices portfolios in this run
-
asOf
Instant asOf()- Returns:
- when the facts were gathered
-