Class MarkerConstraint
- java.lang.Object
-
- org.onosproject.net.intent.constraint.MarkerConstraint
-
- All Implemented Interfaces:
Constraint
- Direct Known Subclasses:
AsymmetricPathConstraint
,DomainConstraint
,HashedPathSelectionConstraint
,NonDisruptiveConstraint
,PartialFailureConstraint
,ProtectionConstraint
public abstract class MarkerConstraint extends Object implements Constraint
Abstract Constraint for constraints not intended to influence individual link cost or path validity.
-
-
Constructor Summary
Constructors Constructor Description MarkerConstraint()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
cost(Link link, ResourceContext context)
Evaluates the specified link and provides the cost for its traversal.boolean
equals(Object obj)
int
hashCode()
String
toString()
boolean
validate(Path path, ResourceContext context)
Validates that the specified path satisfies the constraint.
-
-
-
Method Detail
-
cost
public final double cost(Link link, ResourceContext context)
Description copied from interface:Constraint
Evaluates the specified link and provides the cost for its traversal.- Specified by:
cost
in interfaceConstraint
- Parameters:
link
- link to be evaluatedcontext
- resource context for validating availability of resources- Returns:
- cost of link traversal
-
validate
public final boolean validate(Path path, ResourceContext context)
Description copied from interface:Constraint
Validates that the specified path satisfies the constraint.- Specified by:
validate
in interfaceConstraint
- Parameters:
path
- path to be validatedcontext
- resource context for validating availability of resources- Returns:
- cost of link traversal
-
-