Package org.onosproject.net.meter
Class DefaultMeterFeatures
- java.lang.Object
-
- org.onosproject.net.meter.DefaultMeterFeatures
-
- All Implemented Interfaces:
MeterFeatures
public final class DefaultMeterFeatures extends 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 Set<Band.Type>
bandTypes()
Returns band types supported.static DefaultMeterFeatures.Builder
builder()
DeviceId
deviceId()
Return the device id to which this meter features apply.long
endIndex()
Returns the end index (inclusive) of the meters.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)
MeterScope
scope()
Returns Meter Scope.long
startIndex()
Returns the start index (inclusive) of the meters.String
toString()
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.
-
startIndex
public long startIndex()
Description copied from interface:MeterFeatures
Returns the start index (inclusive) of the meters.- Specified by:
startIndex
in interfaceMeterFeatures
- Returns:
- the start index
-
endIndex
public long endIndex()
Description copied from interface:MeterFeatures
Returns the end index (inclusive) of the meters.- Specified by:
endIndex
in interfaceMeterFeatures
- Returns:
- the end index
-
bandTypes
public 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 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 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.
-
scope
public MeterScope scope()
Description copied from interface:MeterFeatures
Returns Meter Scope.- Specified by:
scope
in interfaceMeterFeatures
- Returns:
- meter scope
-
builder
public static DefaultMeterFeatures.Builder builder()
-
noMeterFeatures
public static MeterFeatures noMeterFeatures(DeviceId deviceId)
-
-