public interface RegionStore extends Store<RegionEvent,RegionStoreDelegate>
Modifier and Type | Method and Description |
---|---|
void |
addDevices(RegionId regionId,
java.util.Collection<DeviceId> deviceIds)
Adds the specified collection of devices to the region.
|
Region |
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.
|
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<Region> |
getRegions()
Returns set of all regions.
|
void |
removeDevices(RegionId regionId,
java.util.Collection<DeviceId> deviceIds)
Removes the specified collection of devices from the region.
|
void |
removeRegion(RegionId regionId)
Removes the specified region using the new set of data.
|
Region |
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.
|
hasDelegate, setDelegate, unsetDelegate
java.util.Set<Region> getRegions()
Region getRegion(RegionId regionId)
regionId
- region identifierItemNotFoundException
- if region with given
id does not existRegion getRegionForDevice(DeviceId deviceId)
deviceId
- device identifierjava.util.Set<DeviceId> getRegionDevices(RegionId regionId)
regionId
- region identifierRegion createRegion(RegionId regionId, java.lang.String name, Region.Type type, Annotations annots, java.util.List<java.util.Set<NodeId>> masterNodeIds)
regionId
- region identifiername
- friendly nametype
- region typeannots
- annotationsmasterNodeIds
- list of master nodes; null implies empty listjava.lang.IllegalArgumentException
- if item already existsRegion updateRegion(RegionId regionId, java.lang.String name, Region.Type type, Annotations annots, java.util.List<java.util.Set<NodeId>> masterNodeIds)
regionId
- region identifiername
- friendly nametype
- region typeannots
- annotationsmasterNodeIds
- list of master nodes; null implies empty listjava.lang.IllegalArgumentException
- if item already existsvoid removeRegion(RegionId regionId)
regionId
- region identifiervoid addDevices(RegionId regionId, java.util.Collection<DeviceId> deviceIds)
regionId
- region identifierdeviceIds
- list of device identifiers