Package org.onosproject.net.region
Interface RegionStore
- 
- All Superinterfaces:
- Store<RegionEvent,RegionStoreDelegate>
 
 public interface RegionStore extends Store<RegionEvent,RegionStoreDelegate> Manages inventory of regions of devices; not intended for direct use.
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddDevices(RegionId regionId, java.util.Collection<DeviceId> deviceIds)Adds the specified collection of devices to the region.RegioncreateRegion(RegionId regionId, java.lang.String name, Region.Type type, Annotations annots, java.util.List<java.util.Set<NodeId>> masterNodeIds)Creates a new region using the supplied data.RegiongetRegion(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.RegiongetRegionForDevice(DeviceId deviceId)Returns the region to which the specified device belongs.java.util.Set<Region>getRegions()Returns set of all regions.voidremoveDevices(RegionId regionId, java.util.Collection<DeviceId> deviceIds)Removes the specified collection of devices from the region.voidremoveRegion(RegionId regionId)Removes the specified region using the new set of data.RegionupdateRegion(RegionId regionId, java.lang.String name, Region.Type type, Annotations annots, java.util.List<java.util.Set<NodeId>> masterNodeIds)Updates the specified new region using the supplied data.- 
Methods inherited from interface org.onosproject.store.StorehasDelegate, setDelegate, unsetDelegate
 
- 
 
- 
- 
- 
Method Detail- 
getRegionsjava.util.Set<Region> getRegions() Returns set of all regions.- Returns:
- set of regions
 
 - 
getRegionRegion 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
 
 - 
getRegionForDeviceRegion 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
 
 - 
getRegionDevicesjava.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
 
 - 
createRegionRegion createRegion(RegionId regionId, java.lang.String name, Region.Type type, Annotations annots, java.util.List<java.util.Set<NodeId>> masterNodeIds) Creates a new region using the supplied data.- Parameters:
- regionId- region identifier
- name- friendly name
- type- region type
- annots- annotations
- masterNodeIds- list of master nodes; null implies empty list
- Returns:
- new region descriptor
- Throws:
- java.lang.IllegalArgumentException- if item already exists
 
 - 
updateRegionRegion updateRegion(RegionId regionId, java.lang.String name, Region.Type type, Annotations annots, java.util.List<java.util.Set<NodeId>> masterNodeIds) Updates the specified new region using the supplied data.- Parameters:
- regionId- region identifier
- name- friendly name
- type- region type
- annots- annotations
- masterNodeIds- list of master nodes; null implies empty list
- Returns:
- new region descriptor
- Throws:
- java.lang.IllegalArgumentException- if item already exists
 
 - 
removeRegionvoid removeRegion(RegionId regionId) Removes the specified region using the new set of data.- Parameters:
- regionId- region identifier
 
 - 
addDevicesvoid addDevices(RegionId regionId, java.util.Collection<DeviceId> deviceIds) Adds the specified collection of devices to the region.- Parameters:
- regionId- region identifier
- deviceIds- list of device identifiers
 
 
- 
 
-