Package org.onosproject.net.meter
Class DefaultMeterFeatures
- java.lang.Object
-
- org.onosproject.net.meter.DefaultMeterFeatures
-
- All Implemented Interfaces:
MeterFeatures
public final class DefaultMeterFeatures extends java.lang.Object implements MeterFeatures
Default implementation of MeterFeatures.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DefaultMeterFeatures.Builder
A DefaultMeterFeatures builder.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Set<Band.Type>
bandTypes()
Returns band types supported.static DefaultMeterFeatures.Builder
builder()
DeviceId
deviceId()
Return the device id to which this meter features apply.java.util.Set<MeterFeaturesFlag>
features()
Returns features flags that supported for meter actions by device.boolean
isBurstSupported()
Returns if burst size is available.boolean
isStatsSupported()
Returns if statistics collection is available.short
maxBands()
Returns the maximum bands per meter.short
maxColor()
Returns the maximum colors value for DiffServ operation.long
maxMeter()
Returns the maximum number of meters accepted by the device.static MeterFeatures
noMeterFeatures(DeviceId deviceId)
java.lang.String
toString()
java.util.Set<Meter.Unit>
unitTypes()
Returns unit types available for meters.
-
-
-
Method Detail
-
deviceId
public DeviceId deviceId()
Description copied from interface:MeterFeatures
Return the device id to which this meter features apply.- Specified by:
deviceId
in interfaceMeterFeatures
- Returns:
- the device id
-
maxMeter
public long maxMeter()
Description copied from interface:MeterFeatures
Returns the maximum number of meters accepted by the device.- Specified by:
maxMeter
in interfaceMeterFeatures
- Returns:
- the maximum meter value.
-
bandTypes
public java.util.Set<Band.Type> bandTypes()
Description copied from interface:MeterFeatures
Returns band types supported.- Specified by:
bandTypes
in interfaceMeterFeatures
- Returns:
- the band types supported.
-
unitTypes
public java.util.Set<Meter.Unit> unitTypes()
Description copied from interface:MeterFeatures
Returns unit types available for meters.- Specified by:
unitTypes
in interfaceMeterFeatures
- Returns:
- the unit types available.
-
isBurstSupported
public boolean isBurstSupported()
Description copied from interface:MeterFeatures
Returns if burst size is available.- Specified by:
isBurstSupported
in interfaceMeterFeatures
- Returns:
- burst availability
-
isStatsSupported
public boolean isStatsSupported()
Description copied from interface:MeterFeatures
Returns if statistics collection is available.- Specified by:
isStatsSupported
in interfaceMeterFeatures
- Returns:
- statistics availability
-
maxBands
public short maxBands()
Description copied from interface:MeterFeatures
Returns the maximum bands per meter.- Specified by:
maxBands
in interfaceMeterFeatures
- Returns:
- the max bands value
-
maxColor
public short maxColor()
Description copied from interface:MeterFeatures
Returns the maximum colors value for DiffServ operation.- Specified by:
maxColor
in interfaceMeterFeatures
- Returns:
- the maximum colors value.
-
features
public java.util.Set<MeterFeaturesFlag> features()
Description copied from interface:MeterFeatures
Returns features flags that supported for meter actions by device.- Specified by:
features
in interfaceMeterFeatures
- Returns:
- meter features flags otherwise empty set.
-
builder
public static DefaultMeterFeatures.Builder builder()
-
noMeterFeatures
public static MeterFeatures noMeterFeatures(DeviceId deviceId)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-