Class 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
      boolean containsNextHop​(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.
      boolean equals​(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.
      int hashCode()  
      Set<org.onosproject.net.DeviceId> nextHops​(org.onosproject.net.DeviceId deviceId)
      Set of next-hops towards the given destination.
      int nextId()
      Return the nextId representing the nextObjective towards the next-hops.
      String toString()  
    • Constructor Detail

      • NextNeighbors

        public NextNeighbors​(Map<org.onosproject.net.DeviceId,​Set<org.onosproject.net.DeviceId>> dstNextHops,
                             int nextId)
        Constructor.
        Parameters:
        dstNextHops - map of destinations and the next-hops towards each dest
        nextId - id of nextObjective that manifests the next-hop info
    • 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
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object