Package org.onosproject.net.meter
Class DefaultMeterFeatures.Builder
- java.lang.Object
-
- org.onosproject.net.meter.DefaultMeterFeatures.Builder
-
- All Implemented Interfaces:
MeterFeatures.Builder
- Enclosing class:
- DefaultMeterFeatures
public static final class DefaultMeterFeatures.Builder extends java.lang.Object implements MeterFeatures.Builder
A DefaultMeterFeatures builder.
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MeterFeatures
build()
Builds the Meter Features based on the specified parameters.MeterFeatures.Builder
forDevice(DeviceId deviceId)
Assigns the target device for this meter features.MeterFeatures.Builder
hasBurst(boolean hasBurst)
Assigns the burst capabilities.MeterFeatures.Builder
hasStats(boolean hasStats)
Assigns the stats capabilities.MeterFeatures.Builder
withBandTypes(java.util.Set<Band.Type> types)
Assigns the band types for this meter features.MeterFeatures.Builder
withFeatures(java.util.Set<MeterFeaturesFlag> featureFlags)
Assigns the features for this meter features for OF1.5.MeterFeatures.Builder
withMaxBands(short maxBands)
Assigns the max bands value for this meter features.MeterFeatures.Builder
withMaxColors(short maxColors)
Assigns the max colors value for this meter features.MeterFeatures.Builder
withMaxMeters(long maxMeter)
Assigns the max meters value for this meter features.MeterFeatures.Builder
withUnits(java.util.Set<Meter.Unit> units)
Assigns the capabilities for this meter features.
-
-
-
Method Detail
-
forDevice
public MeterFeatures.Builder forDevice(DeviceId deviceId)
Description copied from interface:MeterFeatures.Builder
Assigns the target device for this meter features.- Specified by:
forDevice
in interfaceMeterFeatures.Builder
- Parameters:
deviceId
- a device id- Returns:
- this builder
-
withMaxMeters
public MeterFeatures.Builder withMaxMeters(long maxMeter)
Description copied from interface:MeterFeatures.Builder
Assigns the max meters value for this meter features.- Specified by:
withMaxMeters
in interfaceMeterFeatures.Builder
- Parameters:
maxMeter
- the maximum meters available- Returns:
- this builder
-
withMaxBands
public MeterFeatures.Builder withMaxBands(short maxBands)
Description copied from interface:MeterFeatures.Builder
Assigns the max bands value for this meter features.- Specified by:
withMaxBands
in interfaceMeterFeatures.Builder
- Parameters:
maxBands
- the maximum bands available.- Returns:
- this builder
-
withMaxColors
public MeterFeatures.Builder withMaxColors(short maxColors)
Description copied from interface:MeterFeatures.Builder
Assigns the max colors value for this meter features.- Specified by:
withMaxColors
in interfaceMeterFeatures.Builder
- Parameters:
maxColors
- the maximum colors available.- Returns:
- this builder
-
withBandTypes
public MeterFeatures.Builder withBandTypes(java.util.Set<Band.Type> types)
Description copied from interface:MeterFeatures.Builder
Assigns the band types for this meter features.- Specified by:
withBandTypes
in interfaceMeterFeatures.Builder
- Parameters:
types
- the band types available.- Returns:
- this builder
-
withUnits
public MeterFeatures.Builder withUnits(java.util.Set<Meter.Unit> units)
Description copied from interface:MeterFeatures.Builder
Assigns the capabilities for this meter features.- Specified by:
withUnits
in interfaceMeterFeatures.Builder
- Parameters:
units
- the units available- Returns:
- this
-
hasBurst
public MeterFeatures.Builder hasBurst(boolean hasBurst)
Description copied from interface:MeterFeatures.Builder
Assigns the burst capabilities.- Specified by:
hasBurst
in interfaceMeterFeatures.Builder
- Parameters:
hasBurst
- if the burst is supported- Returns:
- this builder
-
hasStats
public MeterFeatures.Builder hasStats(boolean hasStats)
Description copied from interface:MeterFeatures.Builder
Assigns the stats capabilities.- Specified by:
hasStats
in interfaceMeterFeatures.Builder
- Parameters:
hasStats
- if the statistics are supported- Returns:
- this builder
-
withFeatures
public MeterFeatures.Builder withFeatures(java.util.Set<MeterFeaturesFlag> featureFlags)
Description copied from interface:MeterFeatures.Builder
Assigns the features for this meter features for OF1.5.- Specified by:
withFeatures
in interfaceMeterFeatures.Builder
- Parameters:
featureFlags
- if meter features flags are supported- Returns:
- this builder
-
build
public MeterFeatures build()
Description copied from interface:MeterFeatures.Builder
Builds the Meter Features based on the specified parameters.- Specified by:
build
in interfaceMeterFeatures.Builder
- Returns:
- the meter features
-
-