public final class SharedBandwidthConstraint extends BooleanConstraint
| Constructor and Description |
|---|
SharedBandwidthConstraint(List<Link> links,
org.onlab.util.Bandwidth sharedBwValue,
org.onlab.util.Bandwidth requestBwValue)
Creates a new SharedBandwidth constraint.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
int |
hashCode() |
boolean |
isValid(Link link,
ResourceContext context)
Returns true if the specified link satisfies the constraint.
|
List<Link> |
links()
Obtains shared links.
|
static SharedBandwidthConstraint |
of(List<Link> links,
org.onlab.util.Bandwidth sharedBwValue,
org.onlab.util.Bandwidth requestBwValue)
Creates a new SharedBandwidth constraint.
|
org.onlab.util.Bandwidth |
requestBwValue()
Obtains requested bandwidth value.
|
org.onlab.util.Bandwidth |
sharedBwValue()
Obtains shared bandwidth of the links.
|
String |
toString() |
cost, validatepublic SharedBandwidthConstraint(List<Link> links, org.onlab.util.Bandwidth sharedBwValue, org.onlab.util.Bandwidth requestBwValue)
links - shared linkssharedBwValue - shared bandwidth of the linksrequestBwValue - requested bandwidth valuepublic static SharedBandwidthConstraint of(List<Link> links, org.onlab.util.Bandwidth sharedBwValue, org.onlab.util.Bandwidth requestBwValue)
links - shared linkssharedBwValue - shared bandwidth of the linksrequestBwValue - requested bandwidth valuepublic org.onlab.util.Bandwidth sharedBwValue()
public org.onlab.util.Bandwidth requestBwValue()
public boolean isValid(Link link, ResourceContext context)
BooleanConstraintisValid in class BooleanConstraintlink - link to be validatedcontext - resource context for checking available resources