Class BasicRegionConfig
- java.lang.Object
- 
- org.onosproject.net.config.Config<S>
- 
- org.onosproject.net.config.basics.AllowedEntityConfig<S>
- 
- org.onosproject.net.config.basics.BasicElementConfig<RegionId>
- 
- org.onosproject.net.config.basics.BasicRegionConfig
 
 
 
 
- 
 public final class BasicRegionConfig extends BasicElementConfig<RegionId> Basic configuration for network regions.
- 
- 
Nested Class Summary- 
Nested classes/interfaces inherited from class org.onosproject.net.config.ConfigConfig.FieldPresence
 
- 
 - 
Field Summary- 
Fields inherited from class org.onosproject.net.config.basics.BasicElementConfigGRID_X, GRID_Y, LATITUDE, LOC_TYPE_GEO, LOC_TYPE_GRID, LOC_TYPE_NONE, LONGITUDE, NAME, OWNER, RACK_ADDRESS, ROLES, UI_TYPE, ZERO_THRESHOLD
 - 
Fields inherited from class org.onosproject.net.config.basics.AllowedEntityConfigALLOWED
 
- 
 - 
Constructor SummaryConstructors Constructor Description BasicRegionConfig()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description BasicRegionConfigaddPeerLocMapping(java.lang.String peerId, java.lang.String locType, java.lang.Double latOrY, java.lang.Double longOrX)Adds a peer location mapping to this region.java.util.List<DeviceId>devices()Returns the identities of the devices in this region.BasicRegionConfigdevices(java.util.Set<DeviceId> devices)Sets the devices of this region.java.util.List<LayoutLocation>getMappings()Returns the list of layout location mappings for where peer region nodes should be placed on the layout when viewing this region.booleanisValid()Indicates whether or not the backing JSON node contains valid data.java.lang.StringtoString()Region.Typetype()Returns the region type.BasicRegionConfigtype(Region.Type type)Sets the region type.- 
Methods inherited from class org.onosproject.net.config.basics.BasicElementConfiggeoCoordsSet, gridCoordsSet, gridX, gridX, gridY, gridY, latitude, latitude, locType, locType, longitude, longitude, name, name, owner, owner, rackAddress, rackAddress, roles, roles, uiType, uiType
 - 
Methods inherited from class org.onosproject.net.config.basics.AllowedEntityConfigisAllowed, isAllowed
 - 
Methods inherited from class org.onosproject.net.config.Configapply, clear, get, get, get, get, get, get, getList, getList, hasField, hasField, hasFields, hasFields, hasOnlyFields, hasOnlyFields, init, isBoolean, isBoolean, isConnectPoint, isConnectPoint, isDecimal, isDecimal, isIntegralNumber, isIntegralNumber, isIpAddress, isIpAddress, isIpPrefix, isIpPrefix, isMacAddress, isMacAddress, isNumber, isNumber, isString, isString, isTpPort, isTpPort, isValidLength, key, node, setList, setOrClear, setOrClear, setOrClear, setOrClear, setOrClear, setOrClear, setOrClear, subject
 
- 
 
- 
- 
- 
Method Detail- 
isValidpublic boolean isValid() Description copied from class:ConfigIndicates whether or not the backing JSON node contains valid data.Default implementation returns true. Subclasses are expected to override this with their own validation. Implementations are free to throw a RuntimeException if data is invalid. - Overrides:
- isValidin class- BasicElementConfig<RegionId>
- Returns:
- true if the data is valid; false otherwise
 
 - 
typepublic Region.Type type() Returns the region type.- Returns:
- the region type
 
 - 
typepublic BasicRegionConfig type(Region.Type type) Sets the region type.- Parameters:
- type- the region type, or null to unset
- Returns:
- the config of the region
 
 - 
devicespublic java.util.List<DeviceId> devices() Returns the identities of the devices in this region.- Returns:
- list of device identifiers
 
 - 
devicespublic BasicRegionConfig devices(java.util.Set<DeviceId> devices) Sets the devices of this region.- Parameters:
- devices- the device identifiers, or null to unset
- Returns:
- the config of the region
 
 - 
addPeerLocMappingpublic BasicRegionConfig addPeerLocMapping(java.lang.String peerId, java.lang.String locType, java.lang.Double latOrY, java.lang.Double longOrX) Adds a peer location mapping to this region.- Parameters:
- peerId- the region ID of the peer
- locType- the type of location (geo/grid)
- latOrY- geo latitude / grid y-coord
- longOrX- geo longitude / grid x-coord
- Returns:
- self
 
 - 
getMappingspublic java.util.List<LayoutLocation> getMappings() Returns the list of layout location mappings for where peer region nodes should be placed on the layout when viewing this region.- Returns:
- list of peer node locations
 
 
- 
 
-