Class DefaultRegion

    • Constructor Detail

      • DefaultRegion

        public DefaultRegion​(RegionId id,
                             String name,
                             Region.Type type,
                             Annotations annots,
                             List<Set<NodeId>> masters)
        Creates a region using the supplied information.
        Parameters:
        id - region identifier
        name - friendly name
        type - region type
        annots - annotations
        masters - list of sets of cluster node identifiers; in order of mastership
    • Method Detail

      • id

        public RegionId id()
        Description copied from interface: Region
        Returns the unique identifier of the region.
        Specified by:
        id in interface Region
        Returns:
        region identifier
      • name

        public String name()
        Description copied from interface: Region
        Returns the friendly region name that can be used for display purposes.
        Specified by:
        name in interface Region
        Returns:
        friendly name of the region
      • type

        public Region.Type type()
        Description copied from interface: Region
        Returns the region type.
        Specified by:
        type in interface Region
        Returns:
        region type
      • masters

        public List<Set<NodeId>> masters()
        Description copied from interface: Region
        Returns the list of master node sets. The sets of cluster node identifiers should be listed in the order of preferred mastership. Nodes specified in each sets should be considered with equally priority and devices in the region can be balanced between them based on other criteria, e.g. load.
        Specified by:
        masters in interface Region
        Returns:
        list of preferred master node sets
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object