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 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 MeterFeaturesbuild()Builds the Meter Features based on the specified parameters.MeterFeatures.BuilderforDevice(DeviceId deviceId)Assigns the target device for this meter features.MeterFeatures.BuilderhasBurst(boolean hasBurst)Assigns the burst capabilities.MeterFeatures.BuilderhasStats(boolean hasStats)Assigns the stats capabilities.MeterFeatures.BuilderwithBandTypes(Set<Band.Type> types)Assigns the band types for this meter features.MeterFeatures.BuilderwithEndIndex(long endIndex)Assigns the end index (inclusive) for this meter features.MeterFeatures.BuilderwithFeatures(Set<MeterFeaturesFlag> featureFlags)Assigns the features for this meter features for OF1.5.MeterFeatures.BuilderwithMaxBands(short maxBands)Assigns the max bands value for this meter features.MeterFeatures.BuilderwithMaxColors(short maxColors)Assigns the max colors value for this meter features.MeterFeatures.BuilderwithMaxMeters(long maxMeter)Assigns the max meters value for this meter features.MeterFeatures.BuilderwithScope(MeterScope scope)Assigns the meter scope.MeterFeatures.BuilderwithStartIndex(long startIndex)Assigns the start index (inclusive) for this meter features.MeterFeatures.BuilderwithUnits(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.BuilderAssigns the target device for this meter features.- Specified by:
forDevicein interfaceMeterFeatures.Builder- Parameters:
deviceId- a device id- Returns:
- this builder
-
withMaxMeters
public MeterFeatures.Builder withMaxMeters(long maxMeter)
Description copied from interface:MeterFeatures.BuilderAssigns the max meters value for this meter features.- Specified by:
withMaxMetersin interfaceMeterFeatures.Builder- Parameters:
maxMeter- the maximum meters available- Returns:
- this builder
-
withStartIndex
public MeterFeatures.Builder withStartIndex(long startIndex)
Description copied from interface:MeterFeatures.BuilderAssigns the start index (inclusive) for this meter features.- Specified by:
withStartIndexin interfaceMeterFeatures.Builder- Parameters:
startIndex- the start index- Returns:
- this builder
-
withEndIndex
public MeterFeatures.Builder withEndIndex(long endIndex)
Description copied from interface:MeterFeatures.BuilderAssigns the end index (inclusive) for this meter features.- Specified by:
withEndIndexin interfaceMeterFeatures.Builder- Parameters:
endIndex- the end index- Returns:
- this builder
-
withMaxBands
public MeterFeatures.Builder withMaxBands(short maxBands)
Description copied from interface:MeterFeatures.BuilderAssigns the max bands value for this meter features.- Specified by:
withMaxBandsin interfaceMeterFeatures.Builder- Parameters:
maxBands- the maximum bands available.- Returns:
- this builder
-
withMaxColors
public MeterFeatures.Builder withMaxColors(short maxColors)
Description copied from interface:MeterFeatures.BuilderAssigns the max colors value for this meter features.- Specified by:
withMaxColorsin interfaceMeterFeatures.Builder- Parameters:
maxColors- the maximum colors available.- Returns:
- this builder
-
withBandTypes
public MeterFeatures.Builder withBandTypes(Set<Band.Type> types)
Description copied from interface:MeterFeatures.BuilderAssigns the band types for this meter features.- Specified by:
withBandTypesin interfaceMeterFeatures.Builder- Parameters:
types- the band types available.- Returns:
- this builder
-
withUnits
public MeterFeatures.Builder withUnits(Set<Meter.Unit> units)
Description copied from interface:MeterFeatures.BuilderAssigns the capabilities for this meter features.- Specified by:
withUnitsin interfaceMeterFeatures.Builder- Parameters:
units- the units available- Returns:
- this
-
hasBurst
public MeterFeatures.Builder hasBurst(boolean hasBurst)
Description copied from interface:MeterFeatures.BuilderAssigns the burst capabilities.- Specified by:
hasBurstin interfaceMeterFeatures.Builder- Parameters:
hasBurst- if the burst is supported- Returns:
- this builder
-
hasStats
public MeterFeatures.Builder hasStats(boolean hasStats)
Description copied from interface:MeterFeatures.BuilderAssigns the stats capabilities.- Specified by:
hasStatsin interfaceMeterFeatures.Builder- Parameters:
hasStats- if the statistics are supported- Returns:
- this builder
-
withFeatures
public MeterFeatures.Builder withFeatures(Set<MeterFeaturesFlag> featureFlags)
Description copied from interface:MeterFeatures.BuilderAssigns the features for this meter features for OF1.5.- Specified by:
withFeaturesin interfaceMeterFeatures.Builder- Parameters:
featureFlags- if meter features flags are supported- Returns:
- this builder
-
withScope
public MeterFeatures.Builder withScope(MeterScope scope)
Description copied from interface:MeterFeatures.BuilderAssigns the meter scope.- Specified by:
withScopein interfaceMeterFeatures.Builder- Parameters:
scope- the scope- Returns:
- this builder
-
build
public MeterFeatures build()
Description copied from interface:MeterFeatures.BuilderBuilds the Meter Features based on the specified parameters.- Specified by:
buildin interfaceMeterFeatures.Builder- Returns:
- the meter features
-
-