public final class LabelAllocator extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
LabelAllocator.FirstFitSelection
First fit label selection.
|
static interface |
LabelAllocator.LabelSelection
Interface for selection algorithms of the labels.
|
static class |
LabelAllocator.RandomSelection
Random label selection.
|
| Constructor and Description |
|---|
LabelAllocator(org.onosproject.net.resource.ResourceService rs)
Creates a new label allocator.
|
| Modifier and Type | Method and Description |
|---|---|
Map<org.onosproject.net.LinkKey,org.onlab.util.Identifier<?>> |
assignLabelToLinks(Set<org.onosproject.net.Link> links,
org.onosproject.net.intent.IntentId id,
org.onosproject.net.EncapsulationType type)
Allocates labels and associates them to links.
|
Map<org.onosproject.net.ConnectPoint,org.onlab.util.Identifier<?>> |
assignLabelToPorts(Set<org.onosproject.net.Link> links,
org.onosproject.net.intent.IntentId id,
org.onosproject.net.EncapsulationType type)
Allocates labels and associates them to source
and destination ports of a link.
|
LabelAllocator.LabelSelection |
getLabelSelection()
Retrieves the label selection behavior.
|
static boolean |
isInEnum(String value)
Checks if a given string is a valid Behavior.
|
void |
setLabelSelection(String type)
Changes the selection behavior.
|
public LabelAllocator(org.onosproject.net.resource.ResourceService rs)
rs - the resource servicepublic static boolean isInEnum(String value)
value - the string to checkpublic void setLabelSelection(String type)
type - the behavior typepublic LabelAllocator.LabelSelection getLabelSelection()
public Map<org.onosproject.net.LinkKey,org.onlab.util.Identifier<?>> assignLabelToLinks(Set<org.onosproject.net.Link> links, org.onosproject.net.intent.IntentId id, org.onosproject.net.EncapsulationType type)
links - the links where labels will be allocatedid - the intent Idtype - the encapsulation typepublic Map<org.onosproject.net.ConnectPoint,org.onlab.util.Identifier<?>> assignLabelToPorts(Set<org.onosproject.net.Link> links, org.onosproject.net.intent.IntentId id, org.onosproject.net.EncapsulationType type)
links - the links on which labels will be reservedid - the intent Idtype - the encapsulation type