Class BandwidthCapacity
- java.lang.Object
-
- org.onosproject.net.config.Config<ConnectPoint>
-
- org.onosproject.net.config.basics.BandwidthCapacity
-
@Beta public class BandwidthCapacity extends Config<ConnectPoint>
Configuration to specify maximum available bandwidth resource (Capacity) on a port.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.onosproject.net.config.Config
Config.FieldPresence
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
CONFIG_KEY
netcfg ConfigKey forBandwidthCapacity
.
-
Constructor Summary
Constructors Constructor Description BandwidthCapacity()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Bandwidth
capacity()
Available Bandwidth resource (Capacity).BandwidthCapacity
capacity(Bandwidth bandwidth)
Sets the Available Bandwidth resource (Capacity).boolean
isValid()
Indicates whether or not the backing JSON node contains valid data.java.lang.String
toString()
-
Methods inherited from class org.onosproject.net.config.Config
apply, 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
-
-
-
-
Field Detail
-
CONFIG_KEY
public static final java.lang.String CONFIG_KEY
netcfg ConfigKey forBandwidthCapacity
.- See Also:
- Constant Field Values
-
-
Method Detail
-
isValid
public boolean isValid()
Description copied from class:Config
Indicates 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:
isValid
in classConfig<ConnectPoint>
- Returns:
- true if the data is valid; false otherwise
-
capacity
public BandwidthCapacity capacity(Bandwidth bandwidth)
Sets the Available Bandwidth resource (Capacity).- Parameters:
bandwidth
- value to set.- Returns:
- self
-
toString
public java.lang.String toString()
- Overrides:
toString
in classConfig<ConnectPoint>
-
-