public class LatencyConstraint extends Object implements Constraint
| Constructor and Description |
|---|
LatencyConstraint(java.time.Duration latency)
Creates a new constraint to keep under specified latency through a path.
|
| Modifier and Type | Method and Description |
|---|---|
double |
cost(Link link,
LinkResourceService resourceService)
Evaluates the specified link and provides the cost for its traversal.
|
boolean |
equals(Object obj) |
int |
hashCode() |
java.time.Duration |
latency() |
String |
toString() |
boolean |
validate(Path path,
LinkResourceService resourceService)
Validates that the specified path satisfies the constraint.
|
public LatencyConstraint(java.time.Duration latency)
latency - latency to be keptpublic java.time.Duration latency()
public double cost(Link link, LinkResourceService resourceService)
Constraintcost in interface Constraintlink - link to be evaluatedresourceService - resource service for validating availability of
link resourcespublic boolean validate(Path path, LinkResourceService resourceService)
Constraintvalidate in interface Constraintpath - path to be validatedresourceService - resource service for validating availability of
link resourcesCopyright © 2015. All rights reserved.