Class EstateAnalyzer.Builder
java.lang.Object
com.eqixiac.equinix.design.estate.EstateAnalyzer.Builder
- Enclosing class:
EstateAnalyzer
Configures and runs an analysis.
-
Method Summary
Modifier and TypeMethodDescriptionaddRule(EstateRule rule) Adds a rule to the current list.analyze()Runs the analysis.Sets the clock (as-of time of a live snapshot, end of the utilisation window, report time).collect()Collects the snapshot only (live), or returns the given snapshot (offline).Sets the reporting currency (default USD): every price is restated in it, so every finding's saving and the addressable total are in one currency.currencyConverter(CurrencyConverter converter) Supplies exchange rates ranked above the default sources (live ECB rates, then the bundled table).defaultRates(CurrencyConverter defaults) Replaces the default rate sources, for example withCurrencyConverters.bundledOnly()offline.includePortMetrics(boolean include) Also reads port utilisation (default off).metricLimits(int maxSearches, long pauseMillis) Sets the most metric searches in one run (default 200) and the pause between them (default 100 ms).networkEdge(NetworkEdge networkEdge) Also reads the Network Edge devices that in-scope connections use.Receives one progress line per collection step.Sets the rate card;nullleaves every financial impact unpriced.rules(List<EstateRule> rules) Replaces the rules (the defaults areDefaultRules.all()).scope(EstateScope scope) Sets the scope (required for a live run).thresholds(EstateThresholds thresholds) Sets the thresholds.utilization(UtilizationSnapshot utilization) Uses an already collected utilisation snapshot (offline runs, tests).Reads utilisation over this window, ending now (live runs only).
-
Method Details
-
networkEdge
Also reads the Network Edge devices that in-scope connections use.- Parameters:
networkEdge- the Network Edge client- Returns:
- this builder
-
scope
Sets the scope (required for a live run).- Parameters:
scope- the scope- Returns:
- this builder
-
window
Reads utilisation over this window, ending now (live runs only).- Parameters:
window- the window- Returns:
- this builder
-
utilization
Uses an already collected utilisation snapshot (offline runs, tests).- Parameters:
utilization- the snapshot- Returns:
- this builder
-
metricLimits
Sets the most metric searches in one run (default 200) and the pause between them (default 100 ms).- Parameters:
maxSearches- the ceilingpauseMillis- the pause- Returns:
- this builder
-
includePortMetrics
Also reads port utilisation (default off).- Parameters:
include- whether to read it- Returns:
- this builder
-
rateCard
Sets the rate card;nullleaves every financial impact unpriced.- Parameters:
rateCard- the rate card- Returns:
- this builder
-
currency
Sets the reporting currency (default USD): every price is restated in it, so every finding's saving and the addressable total are in one currency. A converted line keeps its original amount and currency, the rate, and the rate's source and date; a price whose currency no rate source covers is unpriced.- Parameters:
currency- an ISO 4217 code- Returns:
- this builder
- Throws:
IllegalArgumentException- whencurrencyis not an ISO 4217 code
-
currencyConverter
Supplies exchange rates ranked above the default sources (live ECB rates, then the bundled table).- Parameters:
converter- the converter, ornullfor none- Returns:
- this builder
-
defaultRates
Replaces the default rate sources, for example withCurrencyConverters.bundledOnly()offline.- Parameters:
defaults- the fallback converter;nullrestores the default- Returns:
- this builder
-
rules
Replaces the rules (the defaults areDefaultRules.all()).- Parameters:
rules- the rules- Returns:
- this builder
-
addRule
Adds a rule to the current list.- Parameters:
rule- the rule- Returns:
- this builder
-
thresholds
Sets the thresholds.- Parameters:
thresholds- the thresholds- Returns:
- this builder
-
clock
Sets the clock (as-of time of a live snapshot, end of the utilisation window, report time).- Parameters:
clock- the clock- Returns:
- this builder
-
progress
Receives one progress line per collection step.- Parameters:
progress- the consumer- Returns:
- this builder
-
collect
Collects the snapshot only (live), or returns the given snapshot (offline).- Returns:
- the snapshot
- Throws:
IllegalStateException- when a live run has no scope
-
analyze
-