Class MetroOptimizer.Builder
java.lang.Object
com.eqixiac.equinix.design.optimizer.MetroOptimizer.Builder
- Enclosing class:
MetroOptimizer
Fluent convenience over
DesignSpec: each call adds to the spec, toSpec() returns it
and optimize() runs MetroOptimizer.forSpec(FabricGateway, DesignSpec). Clouds are identified by their label
(default: the provider's name, or the profile name); a workload's dependsOn refers to the
same cloud, adding it as required when it was not declared.-
Method Summary
Modifier and TypeMethodDescriptionaddWorkload(String label) optimize()preferProvider(CloudProviderType provider) preferProvider(String serviceProfileName) requireProvider(CloudProviderType provider) requireProvider(String serviceProfileName) strategy(OptimizationStrategy strategy) toSpec()
-
Method Details
-
name
- Parameters:
name- the spec name- Returns:
- this builder
-
addSite
- Parameters:
label- the site label- Returns:
- a site builder;
MetroOptimizer.SiteBuilder.done()returns here
-
requireProvider
- Parameters:
provider- a cloud every design must reach- Returns:
- a cloud builder
-
requireProvider
- Parameters:
serviceProfileName- a service provider (profile name substring) every design must reach- Returns:
- a cloud builder
-
preferProvider
- Parameters:
provider- a cloud that counts towards coverage but is not required- Returns:
- a cloud builder
-
preferProvider
- Parameters:
serviceProfileName- a service provider that counts towards coverage but is not required- Returns:
- a cloud builder
-
addWorkload
- Parameters:
label- the workload label- Returns:
- a workload builder
-
constraints
- Returns:
- a constraints builder
-
strategy
- Parameters:
strategy- a named weight profile- Returns:
- this builder
-
weights
- Parameters:
weights- explicit objective weights by id, applied on top of the profile- Returns:
- this builder
-
rateCard
- Parameters:
card- the rate card to price with- Returns:
- this builder
-
term
- Parameters:
term- the commitment term to price at- Returns:
- this builder
-
multicloudEnvironments
- Parameters:
catalog- the native multicloud environment catalogue (Beta)- Returns:
- this builder
-
toSpec
- Returns:
- the spec assembled so far
-
optimize
- Returns:
- the result of
MetroOptimizer.forSpec(fabric, toSpec())
-