Package org.onosproject.net.meter
Interface MeterFeatures.Builder
-
- All Known Implementing Classes:
DefaultMeterFeatures.Builder
- Enclosing interface:
- MeterFeatures
public static interface MeterFeatures.Builder
A meter features builder.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated 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(Set<Band.Type> types)
Assigns the band types for this meter features.MeterFeatures.Builder
withEndIndex(long endIndex)
Assigns the end index (inclusive) for this meter features.MeterFeatures.Builder
withFeatures(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)
Deprecated.in onos-2.5 replaced bywithStartIndex(long)
andwithEndIndex(long)
MeterFeatures.Builder
withScope(MeterScope scope)
Assigns the meter scope.MeterFeatures.Builder
withStartIndex(long startIndex)
Assigns the start index (inclusive) for this meter features.MeterFeatures.Builder
withUnits(Set<Meter.Unit> units)
Assigns the capabilities for this meter features.
-
-
-
Method Detail
-
forDevice
MeterFeatures.Builder forDevice(DeviceId deviceId)
Assigns the target device for this meter features.- Parameters:
deviceId
- a device id- Returns:
- this builder
-
withMaxMeters
@Deprecated MeterFeatures.Builder withMaxMeters(long maxMeter)
Deprecated.in onos-2.5 replaced bywithStartIndex(long)
andwithEndIndex(long)
Assigns the max meters value for this meter features.- Parameters:
maxMeter
- the maximum meters available- Returns:
- this builder
-
withStartIndex
MeterFeatures.Builder withStartIndex(long startIndex)
Assigns the start index (inclusive) for this meter features.- Parameters:
startIndex
- the start index- Returns:
- this builder
-
withEndIndex
MeterFeatures.Builder withEndIndex(long endIndex)
Assigns the end index (inclusive) for this meter features.- Parameters:
endIndex
- the end index- Returns:
- this builder
-
withMaxBands
MeterFeatures.Builder withMaxBands(short maxBands)
Assigns the max bands value for this meter features.- Parameters:
maxBands
- the maximum bands available.- Returns:
- this builder
-
withMaxColors
MeterFeatures.Builder withMaxColors(short maxColors)
Assigns the max colors value for this meter features.- Parameters:
maxColors
- the maximum colors available.- Returns:
- this builder
-
withBandTypes
MeterFeatures.Builder withBandTypes(Set<Band.Type> types)
Assigns the band types for this meter features.- Parameters:
types
- the band types available.- Returns:
- this builder
-
withUnits
MeterFeatures.Builder withUnits(Set<Meter.Unit> units)
Assigns the capabilities for this meter features.- Parameters:
units
- the units available- Returns:
- this
-
hasBurst
MeterFeatures.Builder hasBurst(boolean hasBurst)
Assigns the burst capabilities.- Parameters:
hasBurst
- if the burst is supported- Returns:
- this builder
-
hasStats
MeterFeatures.Builder hasStats(boolean hasStats)
Assigns the stats capabilities.- Parameters:
hasStats
- if the statistics are supported- Returns:
- this builder
-
withFeatures
MeterFeatures.Builder withFeatures(Set<MeterFeaturesFlag> featureFlags)
Assigns the features for this meter features for OF1.5.- Parameters:
featureFlags
- if meter features flags are supported- Returns:
- this builder
-
withScope
MeterFeatures.Builder withScope(MeterScope scope)
Assigns the meter scope.- Parameters:
scope
- the scope- Returns:
- this builder
-
build
MeterFeatures build()
Builds the Meter Features based on the specified parameters.- Returns:
- the meter features
-
-