public final class BasicHostConfig extends BasicElementConfig<HostId>
Config.FieldPresenceGRID_X, GRID_Y, LATITUDE, LOC_TYPE, LONGITUDE, NAME, OWNER, RACK_ADDRESS, UI_TYPE, ZERO_THRESHOLDALLOWED| Constructor and Description |
|---|
BasicHostConfig() |
| Modifier and Type | Method and Description |
|---|---|
java.util.Set<IpAddress> |
ipAddresses()
Returns IP addresses of the host.
|
boolean |
isValid()
Indicates whether or not the backing JSON node contains valid data.
|
java.util.Set<HostLocation> |
locations()
Returns the location of the host.
|
java.lang.String |
name()
Returns friendly label for the element.
|
BasicHostConfig |
setIps(java.util.Set<IpAddress> ipAddresses)
Sets the IP addresses of the host.
|
BasicHostConfig |
setLocations(java.util.Set<HostLocation> locations)
Sets the location of the host.
|
geoCoordsSet, gridCoordsSet, gridX, gridX, gridY, gridY, latitude, latitude, locType, locType, longitude, longitude, name, owner, owner, rackAddress, rackAddress, 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, subject, toStringpublic 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<HostId>public java.lang.String name()
BasicElementConfigname in class BasicElementConfig<HostId>public java.util.Set<HostLocation> locations()
java.lang.IllegalArgumentException - if locations are set but empty or not
specified with correct formatpublic BasicHostConfig setLocations(java.util.Set<HostLocation> locations)
locations - location of the host or null to unsetpublic java.util.Set<IpAddress> ipAddresses()
java.lang.IllegalArgumentException - if not specified with correct formatpublic BasicHostConfig setIps(java.util.Set<IpAddress> ipAddresses)
ipAddresses - IP addresses of the host or null to unset