Class EstateAnalyzer.Builder

java.lang.Object
com.eqixiac.equinix.design.estate.EstateAnalyzer.Builder
Enclosing class:
EstateAnalyzer

public static final class EstateAnalyzer.Builder extends Object
Configures and runs an analysis.
  • Method Details

    • networkEdge

      public EstateAnalyzer.Builder networkEdge(NetworkEdge networkEdge)
      Also reads the Network Edge devices that in-scope connections use.
      Parameters:
      networkEdge - the Network Edge client
      Returns:
      this builder
    • scope

      public EstateAnalyzer.Builder scope(EstateScope scope)
      Sets the scope (required for a live run).
      Parameters:
      scope - the scope
      Returns:
      this builder
    • window

      public EstateAnalyzer.Builder window(Duration window)
      Reads utilisation over this window, ending now (live runs only).
      Parameters:
      window - the window
      Returns:
      this builder
    • utilization

      public EstateAnalyzer.Builder utilization(UtilizationSnapshot utilization)
      Uses an already collected utilisation snapshot (offline runs, tests).
      Parameters:
      utilization - the snapshot
      Returns:
      this builder
    • metricLimits

      public EstateAnalyzer.Builder metricLimits(int maxSearches, long pauseMillis)
      Sets the most metric searches in one run (default 200) and the pause between them (default 100 ms).
      Parameters:
      maxSearches - the ceiling
      pauseMillis - the pause
      Returns:
      this builder
    • includePortMetrics

      public EstateAnalyzer.Builder includePortMetrics(boolean include)
      Also reads port utilisation (default off).
      Parameters:
      include - whether to read it
      Returns:
      this builder
    • rateCard

      public EstateAnalyzer.Builder rateCard(RateCard rateCard)
      Sets the rate card; null leaves every financial impact unpriced.
      Parameters:
      rateCard - the rate card
      Returns:
      this builder
    • currency

      public EstateAnalyzer.Builder currency(String 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 - when currency is not an ISO 4217 code
    • currencyConverter

      public EstateAnalyzer.Builder currencyConverter(CurrencyConverter converter)
      Supplies exchange rates ranked above the default sources (live ECB rates, then the bundled table).
      Parameters:
      converter - the converter, or null for none
      Returns:
      this builder
    • defaultRates

      public EstateAnalyzer.Builder defaultRates(CurrencyConverter defaults)
      Replaces the default rate sources, for example with CurrencyConverters.bundledOnly() offline.
      Parameters:
      defaults - the fallback converter; null restores the default
      Returns:
      this builder
    • rules

      public EstateAnalyzer.Builder rules(List<EstateRule> rules)
      Replaces the rules (the defaults are DefaultRules.all()).
      Parameters:
      rules - the rules
      Returns:
      this builder
    • addRule

      public EstateAnalyzer.Builder addRule(EstateRule rule)
      Adds a rule to the current list.
      Parameters:
      rule - the rule
      Returns:
      this builder
    • thresholds

      public EstateAnalyzer.Builder thresholds(EstateThresholds thresholds)
      Sets the thresholds.
      Parameters:
      thresholds - the thresholds
      Returns:
      this builder
    • clock

      public EstateAnalyzer.Builder clock(Clock 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

      public EstateAnalyzer.Builder progress(Consumer<String> progress)
      Receives one progress line per collection step.
      Parameters:
      progress - the consumer
      Returns:
      this builder
    • collect

      public EstateInventory 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

      public EstateReport analyze()
      Runs the analysis.
      Returns:
      the report