Class NextNeighbors
- java.lang.Object
-
- org.onosproject.segmentrouting.grouphandler.NextNeighbors
-
public class NextNeighbors extends Object
Represents the nexthop information associated with a route-path towards a set of destinations.
-
-
Constructor Summary
Constructors Constructor Description NextNeighbors(Map<org.onosproject.net.DeviceId,Set<org.onosproject.net.DeviceId>> dstNextHops, int nextId)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancontainsNextHop(org.onosproject.net.DeviceId nextHopId)Checks if the given nextHopId is a valid next hop to any one of the destinations.Map<org.onosproject.net.DeviceId,Set<org.onosproject.net.DeviceId>>dstNextHops()Returns a map of destinations and the next-hops towards them.booleanequals(Object o)Set<org.onosproject.net.DeviceId>getDstForNextHop(org.onosproject.net.DeviceId nextHopId)Returns a set of destinations which have the given nextHopId as one of the next-hops to that destination.inthashCode()Set<org.onosproject.net.DeviceId>nextHops(org.onosproject.net.DeviceId deviceId)Set of next-hops towards the given destination.intnextId()Return the nextId representing the nextObjective towards the next-hops.StringtoString()
-
-
-
Method Detail
-
dstNextHops
public Map<org.onosproject.net.DeviceId,Set<org.onosproject.net.DeviceId>> dstNextHops()
Returns a map of destinations and the next-hops towards them.- Returns:
- map of destinations and the next-hops towards them
-
nextHops
public Set<org.onosproject.net.DeviceId> nextHops(org.onosproject.net.DeviceId deviceId)
Set of next-hops towards the given destination.- Parameters:
deviceId- the destination- Returns:
- set of nexthops towards the destination
-
nextId
public int nextId()
Return the nextId representing the nextObjective towards the next-hops.- Returns:
- nextId representing the nextObjective towards the next-hops
-
containsNextHop
public boolean containsNextHop(org.onosproject.net.DeviceId nextHopId)
Checks if the given nextHopId is a valid next hop to any one of the destinations.- Parameters:
nextHopId- the deviceId for the next hop- Returns:
- true if given next
-
getDstForNextHop
public Set<org.onosproject.net.DeviceId> getDstForNextHop(org.onosproject.net.DeviceId nextHopId)
Returns a set of destinations which have the given nextHopId as one of the next-hops to that destination.- Parameters:
nextHopId- the deviceId for the next hop- Returns:
- set of deviceIds that have the given nextHopId as a next-hop which could be empty if no destinations were found
-
-