public final class BasicRegionConfig extends BasicElementConfig<RegionId>
Config.FieldPresenceGRID_X, GRID_Y, LATITUDE, LOC_TYPE_GEO, LOC_TYPE_GRID, LOC_TYPE_NONE, LONGITUDE, NAME, OWNER, RACK_ADDRESS, ROLES, UI_TYPE, ZERO_THRESHOLDALLOWED| Constructor and Description | 
|---|
BasicRegionConfig()  | 
| Modifier and Type | Method and Description | 
|---|---|
BasicRegionConfig | 
addPeerLocMapping(String peerId,
                 String locType,
                 Double latOrY,
                 Double longOrX)
Adds a peer location mapping to this region. 
 | 
List<DeviceId> | 
devices()
Returns the identities of the devices in this region. 
 | 
BasicRegionConfig | 
devices(Set<DeviceId> devices)
Sets the devices of this region. 
 | 
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. 
 | 
boolean | 
isValid()
Indicates whether or not the backing JSON node contains valid data. 
 | 
String | 
toString()  | 
Region.Type | 
type()
Returns the region type. 
 | 
BasicRegionConfig | 
type(Region.Type type)
Sets the region type. 
 | 
geoCoordsSet, gridCoordsSet, gridX, gridX, gridY, gridY, latitude, latitude, locType, locType, longitude, longitude, name, name, owner, owner, rackAddress, rackAddress, roles, roles, uiType, uiTypeisAllowed, isAllowedapply, 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, subjectpublic boolean isValid()
ConfigDefault implementation returns true. Subclasses are expected to override this with their own validation. Implementations are free to throw a RuntimeException if data is invalid.
isValid in class BasicElementConfig<RegionId>public Region.Type type()
public BasicRegionConfig type(Region.Type type)
type - the region type, or null to unsetpublic List<DeviceId> devices()
public BasicRegionConfig devices(Set<DeviceId> devices)
devices - the device identifiers, or null to unsetpublic BasicRegionConfig addPeerLocMapping(String peerId, String locType, Double latOrY, Double longOrX)
peerId - the region ID of the peerlocType - the type of location (geo/grid)latOrY - geo latitude / grid y-coordlongOrX - geo longitude / grid x-coordpublic List<LayoutLocation> getMappings()