Interface RegionAdminService

    • Method Detail

      • createRegion

        Region createRegion​(RegionId regionId,
                            String name,
                            Region.Type type,
                            List<Set<NodeId>> masterNodeIds)
        Creates a new region using the supplied data.
        Parameters:
        regionId - region identifier
        name - friendly name
        type - region type
        masterNodeIds - list of sets of master nodes; null implies empty list
        Returns:
        new region descriptor
        Throws:
        IllegalArgumentException - if region already exists
      • updateRegion

        Region updateRegion​(RegionId regionId,
                            String name,
                            Region.Type type,
                            List<Set<NodeId>> masterNodeIds)
        Update the specified region using the new set of data.
        Parameters:
        regionId - region identifier
        name - friendly name
        type - region type
        masterNodeIds - list of sets of master nodes; null implies empty list
        Returns:
        new region descriptor
      • removeRegion

        void removeRegion​(RegionId regionId)
        Removes the specified region using the new set of data.
        Parameters:
        regionId - region identifier
      • addDevices

        void addDevices​(RegionId regionId,
                        Collection<DeviceId> deviceIds)
        Adds the specified collection of devices to the region.
        Parameters:
        regionId - region identifier
        deviceIds - list of device identifiers
      • removeDevices

        void removeDevices​(RegionId regionId,
                           Collection<DeviceId> deviceIds)
        Removes the specified collection of devices from the region.
        Parameters:
        regionId - region identifier
        deviceIds - list of device identifiers