Interface RegionAdminService

    • Method Detail

      • createRegion

        Region createRegion​(RegionId regionId,
                            java.lang.String name,
                            Region.Type type,
                            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
        masterNodeIds - list of sets of master nodes; null implies empty list
        Returns:
        new region descriptor
        Throws:
        java.lang.IllegalArgumentException - if region already exists
      • updateRegion

        Region updateRegion​(RegionId regionId,
                            java.lang.String name,
                            Region.Type type,
                            java.util.List<java.util.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,
                        java.util.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,
                           java.util.Collection<DeviceId> deviceIds)
        Removes the specified collection of devices from the region.
        Parameters:
        regionId - region identifier
        deviceIds - list of device identifiers