public interface IRoutingService extends IFloodlightService
Modifier and Type | Interface and Description |
---|---|
static class |
IRoutingService.PATH_METRIC
The metric used to compute paths across the topology
|
Modifier and Type | Method and Description |
---|---|
void |
addRoutingDecisionChangedListener(IRoutingDecisionChangedListener listener)
Register the RDCListener
|
boolean |
forceRecompute()
Recompute paths now, regardless of whether or not there was a change in the
topology.
|
int |
getMaxPathsToCompute()
Get the max paths that are computed by default (fast).
|
Path |
getPath(org.projectfloodlight.openflow.types.DatapathId src,
org.projectfloodlight.openflow.types.DatapathId dst)
Locates a path between src and dst
|
Path |
getPath(org.projectfloodlight.openflow.types.DatapathId src,
org.projectfloodlight.openflow.types.OFPort srcPort,
org.projectfloodlight.openflow.types.DatapathId dst,
org.projectfloodlight.openflow.types.OFPort dstPort)
Provides a path between srcPort on src and dstPort on dst.
|
IRoutingService.PATH_METRIC |
getPathMetric()
Get the metric being used to compute paths
across the topology.
|
java.util.List<Path> |
getPathsFast(org.projectfloodlight.openflow.types.DatapathId src,
org.projectfloodlight.openflow.types.DatapathId dst)
Return all possible paths up to quantity of the globally configured max.
|
java.util.List<Path> |
getPathsFast(org.projectfloodlight.openflow.types.DatapathId src,
org.projectfloodlight.openflow.types.DatapathId dst,
int numReqPaths)
This function returns K number of paths between a source and destination
**if they exist in the pathcache**.
|
java.util.List<Path> |
getPathsSlow(org.projectfloodlight.openflow.types.DatapathId src,
org.projectfloodlight.openflow.types.DatapathId dst,
int numReqPaths)
This function returns K number of paths between a source and destination.
|
void |
handleRoutingDecisionChange(java.lang.Iterable<org.projectfloodlight.openflow.types.Masked<org.projectfloodlight.openflow.types.U64>> changedDecisions)
Notifies listeners that routing logic has changed, requiring certain past routing decisions
to become invalid.
|
boolean |
pathExists(org.projectfloodlight.openflow.types.DatapathId src,
org.projectfloodlight.openflow.types.DatapathId dst)
Check if a path exists between src and dst
|
void |
removeRoutingDecisionChangedListener(IRoutingDecisionChangedListener listener)
Remove the RDCListener
|
void |
setMaxPathsToCompute(int max)
Do not compute more than max paths by default (fast).
|
void |
setPathMetric(IRoutingService.PATH_METRIC metric)
Set the metric used when computing paths
across the topology.
|
void setPathMetric(IRoutingService.PATH_METRIC metric)
metric
- IRoutingService.PATH_METRIC getPathMetric()
void addRoutingDecisionChangedListener(IRoutingDecisionChangedListener listener)
listener
- - The module that wants to listen for eventsvoid removeRoutingDecisionChangedListener(IRoutingDecisionChangedListener listener)
listener
- - The module that wants to stop listening for eventsvoid handleRoutingDecisionChange(java.lang.Iterable<org.projectfloodlight.openflow.types.Masked<org.projectfloodlight.openflow.types.U64>> changedDecisions)
changedDecisions
- Masked descriptors identifying routing decisions that are now obsolete or invalidvoid setMaxPathsToCompute(int max)
max
- int getMaxPathsToCompute()
boolean pathExists(org.projectfloodlight.openflow.types.DatapathId src, org.projectfloodlight.openflow.types.DatapathId dst)
src
- source switchdst
- destination switchPath getPath(org.projectfloodlight.openflow.types.DatapathId src, org.projectfloodlight.openflow.types.DatapathId dst)
src
- source switchdst
- destination switchPath getPath(org.projectfloodlight.openflow.types.DatapathId src, org.projectfloodlight.openflow.types.OFPort srcPort, org.projectfloodlight.openflow.types.DatapathId dst, org.projectfloodlight.openflow.types.OFPort dstPort)
src
- source switchsrcPort
- source port on source switchdst
- destination switchdstPort
- destination port on destination switchjava.util.List<Path> getPathsFast(org.projectfloodlight.openflow.types.DatapathId src, org.projectfloodlight.openflow.types.DatapathId dst)
src
- source switchdst
- destination switchjava.util.List<Path> getPathsFast(org.projectfloodlight.openflow.types.DatapathId src, org.projectfloodlight.openflow.types.DatapathId dst, int numReqPaths)
getPathsSlow(DatapathId, DatapathId, int)
to compute
additional paths in real-time.
The number of paths returned will be the min(numReqPaths, maxConfig),
where maxConfig is the configured ceiling on paths to precompute.src
- source switchdst
- destination switchnumReqPaths
- the requested quantity of pathsjava.util.List<Path> getPathsSlow(org.projectfloodlight.openflow.types.DatapathId src, org.projectfloodlight.openflow.types.DatapathId dst, int numReqPaths)
getPathsFast(DatapathId, DatapathId, int)
or
getPathsFast(DatapathId, DatapathId)
to retrieve the
precomputed paths without the risk of additional overhead.
The number of paths returned will be the min(numReqPaths, availablePaths),
where availablePaths is the permutation of all possible paths in the topology
from src to dst.src
- source switchdst
- destination switchnumReqPaths
- the requested quantity of pathsboolean forceRecompute()
setPathMetric(PATH_METRIC)
was
invoked to change the PATH_METRIC **and we want the new metric to take effect
now** for future getPathsFast() or getPath() function calls. This will allow other
modules using IRoutingService path-finding to use paths based on the new metric
if the other modules only use the "fast" path-finding API.
One can use getPathsSlow(DatapathId, DatapathId, int)
if there is no
urgency for the new metric to take effect and yet one would still like to see
the paths using the new metric once or so. In this case, one need not invoke forceRecompute()
.