Package org.onosproject.net.intent
Interface Constraint
-
- All Known Implementing Classes:
AnnotationConstraint
,AsymmetricPathConstraint
,BandwidthConstraint
,BooleanConstraint
,DomainConstraint
,EncapsulationConstraint
,HashedPathSelectionConstraint
,LatencyConstraint
,LinkTypeConstraint
,MarkerConstraint
,NonDisruptiveConstraint
,ObstacleConstraint
,PartialFailureConstraint
,PathViabilityConstraint
,ProtectedConstraint
,ProtectionConstraint
,WaypointConstraint
@Beta public interface Constraint
Representation of a connectivity constraint capable of evaluating a link and determining the cost of traversing that link in the context of this constraint.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description double
cost(Link link, ResourceContext context)
Evaluates the specified link and provides the cost for its traversal.boolean
validate(Path path, ResourceContext context)
Validates that the specified path satisfies the constraint.
-
-
-
Method Detail
-
cost
double cost(Link link, ResourceContext context)
Evaluates the specified link and provides the cost for its traversal.- Parameters:
link
- link to be evaluatedcontext
- resource context for validating availability of resources- Returns:
- cost of link traversal
-
validate
boolean validate(Path path, ResourceContext context)
Validates that the specified path satisfies the constraint.- Parameters:
path
- path to be validatedcontext
- resource context for validating availability of resources- Returns:
- cost of link traversal
-
-