Package org.onosproject.net.region
Class DefaultRegion
- java.lang.Object
-
- org.onosproject.net.AbstractAnnotated
-
- org.onosproject.net.region.DefaultRegion
-
public final class DefaultRegion extends AbstractAnnotated implements Region
Default implementation of a region.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.onosproject.net.region.Region
Region.Type
-
-
Constructor Summary
Constructors Constructor Description DefaultRegion(RegionId id, String name, Region.Type type, Annotations annots, List<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(Object obj)
int
hashCode()
RegionId
id()
Returns the unique identifier of the region.List<Set<NodeId>>
masters()
Returns the list of master node sets.String
name()
Returns the friendly region name that can be used for display purposes.String
toString()
Region.Type
type()
Returns the region type.-
Methods inherited from class org.onosproject.net.AbstractAnnotated
annotations
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.onosproject.net.Annotated
annotations
-
-
-
-
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 identifiername
- friendly nametype
- region typeannots
- annotationsmasters
- 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.
-
name
public String name()
Description copied from interface:Region
Returns the friendly region name that can be used for display purposes.
-
type
public Region.Type type()
Description copied from interface:Region
Returns the 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.
-
-