Package org.onosproject.net.meter
Interface MeterRequest.Builder
-
- All Known Implementing Classes:
DefaultMeterRequest.Builder
- Enclosing interface:
- MeterRequest
public static interface MeterRequest.Builder
A meter builder.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description MeterRequest
add()
Requests the addition of a meter.MeterRequest.Builder
burst()
Sets this meter as applicable to burst traffic only.MeterRequest.Builder
forDevice(DeviceId deviceId)
Assigns the target device for this meter.MeterRequest.Builder
fromApp(ApplicationId appId)
Assigns the application that built this meter.MeterRequest
remove()
Requests the removal of a meter.MeterRequest.Builder
withBands(java.util.Collection<Band> bands)
Assigns bands to this meter.MeterRequest.Builder
withContext(MeterContext context)
Assigns an execution context for this meter request.MeterRequest.Builder
withUnit(Meter.Unit unit)
Assigns the @See Unit to use for this meter.
-
-
-
Method Detail
-
forDevice
MeterRequest.Builder forDevice(DeviceId deviceId)
Assigns the target device for this meter.- Parameters:
deviceId
- a device id- Returns:
- this
-
fromApp
MeterRequest.Builder fromApp(ApplicationId appId)
Assigns the application that built this meter.- Parameters:
appId
- an application id- Returns:
- this
-
withUnit
MeterRequest.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
MeterRequest.Builder burst()
Sets this meter as applicable to burst traffic only. Defaults to false.- Returns:
- this
-
withBands
MeterRequest.Builder withBands(java.util.Collection<Band> bands)
Assigns bands to this meter. There must be at least one band.- Parameters:
bands
- a collection of bands- Returns:
- this
-
withContext
MeterRequest.Builder withContext(MeterContext context)
Assigns an execution context for this meter request.- Parameters:
context
- a meter context- Returns:
- this
-
add
MeterRequest add()
Requests the addition of a meter.- Returns:
- a meter request
-
remove
MeterRequest remove()
Requests the removal of a meter.- Returns:
- a meter request
-
-