@Test(expected = IllegalArgumentException.class) public void duplicateCreate() { service.createRegion(RID1, "R1", METRO, MASTERS); service.createRegion(RID1, "R2", CAMPUS, MASTERS); }
@Override public Region createRegion(RegionId regionId, String name, Region.Type type, List<Set<NodeId>> masterNodeIds) { checkNotNull(regionId, REGION_ID_NULL); checkNotNull(name, NAME_NULL); checkNotNull(name, REGION_TYPE_NULL); return store.createRegion(regionId, name, type, masterNodeIds == null ? of() : masterNodeIds); }
RegionManager extends AbstractListenerManager<RegionEvent, RegionListener> implements RegionAdminService, RegionService { @Override public Region createRegion(RegionId regionId, String name, Region.Type type, List<Set<NodeId>> masterNodeIds) { checkNotNull(regionId, REGION_ID_NULL); checkNotNull(name, NAME_NULL); checkNotNull(name, REGION_TYPE_NULL); return store.createRegion(regionId, name, type, masterNodeIds == null ? of() : masterNodeIds); } }
RegionManager extends AbstractListenerManager<RegionEvent, RegionListener> implements RegionAdminService, RegionService { @Override public Region createRegion(RegionId regionId, String name, Region.Type type, List<Set<NodeId>> masterNodeIds) { checkNotNull(regionId, REGION_ID_NULL); checkNotNull(name, NAME_NULL); checkNotNull(name, REGION_TYPE_NULL); return store.createRegion(regionId, name, type, masterNodeIds == null ? of() : masterNodeIds); }  }
RegionManager extends AbstractListenerManager<RegionEvent, RegionListener> implements RegionAdminService, RegionService { @Override public Region createRegion(RegionId regionId, String name, Region.Type type, List<Set<NodeId>> masterNodeIds) { checkNotNull(regionId, REGION_ID_NULL); checkNotNull(name, NAME_NULL); checkNotNull(name, REGION_TYPE_NULL); return store.createRegion(regionId, name, type, masterNodeIds == null ? of() : masterNodeIds); }  @Activate void activate(); @Deactivate void deactivate(); @Override Region createRegion(RegionId regionId, String name, Region.Type type,
                               List<Set<NodeId>> masterNodeIds); @Override Region updateRegion(RegionId regionId, String name, Region.Type type,
                               List<Set<NodeId>> masterNodeIds); @Override void removeRegion(RegionId regionId); @Override void addDevices(RegionId regionId, Collection<DeviceId> deviceIds); @Override void removeDevices(RegionId regionId, Collection<DeviceId> deviceIds); @Override Set<Region> getRegions(); @Override Region getRegion(RegionId regionId); @Override Region getRegionForDevice(DeviceId deviceId); @Override Set<DeviceId> getRegionDevices(RegionId regionId); }
RegionManager extends AbstractListenerManager<RegionEvent, RegionListener> implements RegionAdminService, RegionService { @Override public Region createRegion(RegionId regionId, String name, Region.Type type, List<Set<NodeId>> masterNodeIds) { checkNotNull(regionId, REGION_ID_NULL); checkNotNull(name, NAME_NULL); checkNotNull(name, REGION_TYPE_NULL); return store.createRegion(regionId, name, type, masterNodeIds == null ? of() : masterNodeIds); }  @Activate void activate(); @Deactivate void deactivate(); @Override Region createRegion(RegionId regionId, String name, Region.Type type,
                               List<Set<NodeId>> masterNodeIds); @Override Region updateRegion(RegionId regionId, String name, Region.Type type,
                               List<Set<NodeId>> masterNodeIds); @Override void removeRegion(RegionId regionId); @Override void addDevices(RegionId regionId, Collection<DeviceId> deviceIds); @Override void removeDevices(RegionId regionId, Collection<DeviceId> deviceIds); @Override Set<Region> getRegions(); @Override Region getRegion(RegionId regionId); @Override Region getRegionForDevice(DeviceId deviceId); @Override Set<DeviceId> getRegionDevices(RegionId regionId);  }