Class ComplianceZonesConstraint
java.lang.Object
com.eqixiac.equinix.design.constraint.ComplianceZonesConstraint
- All Implemented Interfaces:
Constraint
Every metro must be in a region that at least one zone of
constraints.complianceZones allows
(ComplianceZone.getAllowedRegions()): the design stays within the stated zones. A metro with
no known region is not admitted.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanadmits(MetroFacts metro, DesignContext context) Cheap per-metro pruning before portfolios are formed.check(MetroPortfolio portfolio, DesignContext context) Checks a whole portfolio.id()Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Constraint
usesCostModifier and TypeMethodDescriptiondefault booleanusesCost()WhetherConstraint.check(MetroPortfolio, DesignContext)prices the portfolio throughDesignContext.costModel().
-
Field Details
-
ID
-
-
Constructor Details
-
ComplianceZonesConstraint
public ComplianceZonesConstraint()
-
-
Method Details
-
id
- Specified by:
idin interfaceConstraint- Returns:
- a stable id, lower_snake_case (for example
max_latency)
-
admits
Description copied from interface:ConstraintCheap per-metro pruning before portfolios are formed. Returnfalseonly when no portfolio containing this metro could ever satisfy the constraint (an excluded metro, a metro outside every allowed zone). The default admits every metro.- Specified by:
admitsin interfaceConstraint- Parameters:
metro- a candidate metrocontext- the facts of this run- Returns:
- whether the metro may appear in a portfolio
-
check
Description copied from interface:ConstraintChecks a whole portfolio.- Specified by:
checkin interfaceConstraint- Parameters:
portfolio- the candidate designcontext- the facts of this run- Returns:
- the verdict with its reason
-