Package org.onosproject.net.region
Interface RegionService
-
- All Superinterfaces:
ListenerService<RegionEvent,RegionListener>
- All Known Subinterfaces:
RegionAdminService
public interface RegionService extends ListenerService<RegionEvent,RegionListener>
Service for interacting with inventory of network control regions.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Region
getRegion(RegionId regionId)
Returns the region with the specified identifier.java.util.Set<DeviceId>
getRegionDevices(RegionId regionId)
Returns the set of devices that belong to the specified region.Region
getRegionForDevice(DeviceId deviceId)
Returns the region to which the specified device belongs.java.util.Set<HostId>
getRegionHosts(RegionId regionId)
Returns the set of hosts that belong to the specified region.java.util.Set<Region>
getRegions()
Returns set of all regions.-
Methods inherited from interface org.onosproject.event.ListenerService
addListener, removeListener
-
-
-
-
Method Detail
-
getRegions
java.util.Set<Region> getRegions()
Returns set of all regions.- Returns:
- set of regions
-
getRegion
Region getRegion(RegionId regionId)
Returns the region with the specified identifier.- Parameters:
regionId
- region identifier- Returns:
- region
- Throws:
ItemNotFoundException
- if region with given id does not exist
-
getRegionForDevice
Region getRegionForDevice(DeviceId deviceId)
Returns the region to which the specified device belongs.- Parameters:
deviceId
- device identifier- Returns:
- region or null if device does not belong to any region
-
getRegionDevices
java.util.Set<DeviceId> getRegionDevices(RegionId regionId)
Returns the set of devices that belong to the specified region.- Parameters:
regionId
- region identifier- Returns:
- set of identifiers for devices in the given region
-
-