Package org.onosproject.net.meter
Interface Meter.Builder
-
- All Known Implementing Classes:
DefaultMeter.Builder
- Enclosing interface:
- Meter
public static interface Meter.Builder
A meter builder.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description Meter
build()
Builds the meter based on the specified parameters.Meter.Builder
burst()
Sets this meter as applicable to burst traffic only.Meter.Builder
forDevice(DeviceId deviceId)
Assigns the target device for this meter.Meter.Builder
fromApp(ApplicationId appId)
Assigns the application that built this meter.Meter.Builder
withBands(Collection<Band> bands)
Assigns bands to this meter.Meter.Builder
withCellId(MeterCellId meterId)
Assigns the id to this meter cell.Meter.Builder
withId(MeterId id)
Deprecated.in Nightingale release (version 1.13.0).Meter.Builder
withUnit(Meter.Unit unit)
Assigns the @See Unit to use for this meter.
-
-
-
Method Detail
-
forDevice
Meter.Builder forDevice(DeviceId deviceId)
Assigns the target device for this meter.- Parameters:
deviceId
- a device id- Returns:
- this
-
withId
@Deprecated Meter.Builder withId(MeterId id)
Deprecated.in Nightingale release (version 1.13.0). UsewithCellId(MeterCellId)
instead.Assigns the id to this meter.- Parameters:
id
- a e- Returns:
- this
-
withCellId
Meter.Builder withCellId(MeterCellId meterId)
Assigns the id to this meter cell.- Parameters:
meterId
- a meter cell identifier- Returns:
- this
-
fromApp
Meter.Builder fromApp(ApplicationId appId)
Assigns the application that built this meter.- Parameters:
appId
- an application id- Returns:
- this
-
withUnit
Meter.Builder withUnit(Meter.Unit unit)
Assigns the @See Unit to use for this meter. Defaults to kb/s- Parameters:
unit
- a unit- Returns:
- this
-
burst
Meter.Builder burst()
Sets this meter as applicable to burst traffic only. Defaults to false.- Returns:
- this
-
withBands
Meter.Builder withBands(Collection<Band> bands)
Assigns bands to this meter. There must be at least one band.- Parameters:
bands
- a collection of bands- Returns:
- this
-
build
Meter build()
Builds the meter based on the specified parameters.- Returns:
- a meter
-
-