Class RateCardCostModel.Builder
java.lang.Object
com.eqixiac.equinix.design.cost.RateCardCostModel.Builder
- Enclosing class:
RateCardCostModel
Configures a
RateCardCostModel.-
Method Summary
Modifier and TypeMethodDescriptionbuild()connectionType(ConnectionType type) currencyConverter(CurrencyConverter converter) defaultRates(CurrencyConverter defaults) Replaces the default sources after the supplied converter (live ECB rates, then the bundled table), for example withCurrencyConverters.bundledOnly()for an offline run.Pins exchange rates (normally the spec'scommercial.exchangeRates); they take precedence over every other source.fallbackRateCard(RateCard card) The card an item is priced from when the primary card's lookup times out or fails duringRateCardCostModel.prepare(Collection, DesignContext)(default: the reference table,ReferenceRateCard.standard()).HowRateCardCostModel.prepare(Collection, DesignContext)prices ahead.providerPorts(ReferenceRateCard table) routerPackage(String packageCode)
-
Method Details
-
providerPorts
- Parameters:
table- the reference table cloud-provider port fees come from;nullleaves them unpriced- Returns:
- this builder
-
term
- Parameters:
term- the commitment term to price at;nullkeepsTerm.MONTH_1- Returns:
- this builder
-
connectionType
- Parameters:
type- the Fabric connection type of every cloud leg (defaultIP_VC, router-originated)- Returns:
- this builder
-
routerPackage
- Parameters:
packageCode- the Cloud Router package (defaultSTANDARD)- Returns:
- this builder
-
currency
- Parameters:
currency- ISO 4217 code totals are compared in (normally the spec'scommercial.currency);nullkeeps USD- Returns:
- this builder
-
exchangeRates
Pins exchange rates (normally the spec'scommercial.exchangeRates); they take precedence over every other source.- Parameters:
rates- the rates, their date and source;nullpins none- Returns:
- this builder
-
currencyConverter
- Parameters:
converter- a converter (for example a live FX feed) ranked below pinned rates and above the default live ECB rates and bundled table;nullfor none- Returns:
- this builder
-
defaultRates
Replaces the default sources after the supplied converter (live ECB rates, then the bundled table), for example withCurrencyConverters.bundledOnly()for an offline run.- Parameters:
defaults- the fallback converter;nullrestores the default- Returns:
- this builder
-
fallbackRateCard
The card an item is priced from when the primary card's lookup times out or fails duringRateCardCostModel.prepare(Collection, DesignContext)(default: the reference table,ReferenceRateCard.standard()).- Parameters:
card- the fallback card;nullleaves such items unpriced- Returns:
- this builder
-
prefetch
HowRateCardCostModel.prepare(Collection, DesignContext)prices ahead. Defaults:RateCardCostModel.DEFAULT_PREFETCH_THREADSthreads,RateCardCostModel.DEFAULT_LOOKUP_TIMEOUTper lookup, fallback afterRateCardCostModel.DEFAULT_MAX_TIMEOUTStimeouts.- Parameters:
threads- lookups run at once (0 disables pricing ahead; each item is then priced on first use)lookupTimeout- how long one lookup may run before the fallback card is used insteadmaxTimeouts- after this many timeouts in one run, lookups not yet started use the fallback card without asking the primary card- Returns:
- this builder
-
build
- Returns:
- the cost model
-