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.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.Set<HostId>
getRegionHosts(RegionId regionId)
Returns the set of hosts that belong to the specified region.Set<Region>
getRegions()
Returns set of all regions.-
Methods inherited from interface org.onosproject.event.ListenerService
addListener, removeListener
-
-
-
-
Method Detail
-
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
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
-
-