Class DefaultRegion

    • Nested Class Summary

      • Nested classes/interfaces inherited from interface org.onosproject.net.region.Region

        Region.Type
    • Constructor Summary

      Constructors 
      Constructor Description
      DefaultRegion​(RegionId id, java.lang.String name, Region.Type type, Annotations annots, java.util.List<java.util.Set<NodeId>> masters)
      Creates a region using the supplied information.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object obj)  
      int hashCode()  
      RegionId id()
      Returns the unique identifier of the region.
      java.util.List<java.util.Set<NodeId>> masters()
      Returns the list of master node sets.
      java.lang.String name()
      Returns the friendly region name that can be used for display purposes.
      java.lang.String toString()  
      Region.Type type()
      Returns the region type.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • DefaultRegion

        public DefaultRegion​(RegionId id,
                             java.lang.String name,
                             Region.Type type,
                             Annotations annots,
                             java.util.List<java.util.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 java.lang.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 java.util.List<java.util.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 java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object