Package org.onosproject.net.meter
Interface MeterRequest.Builder
-
- All Known Implementing Classes:
DefaultMeterRequest.Builder
- Enclosing interface:
- MeterRequest
public static interface MeterRequest.BuilderA meter builder.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description MeterRequestadd()Requests the addition of a meter.MeterRequest.Builderburst()Sets this meter as applicable to burst traffic only.MeterRequest.BuilderforDevice(DeviceId deviceId)Assigns the target device for this meter.MeterRequest.BuilderfromApp(ApplicationId appId)Assigns the application that built this meter.MeterRequestremove()Requests the removal of a meter.MeterRequest.BuilderwithAnnotations(Annotations annotations)Sets the annotations.MeterRequest.BuilderwithBands(Collection<Band> bands)Assigns bands to this meter.MeterRequest.BuilderwithContext(MeterContext context)Assigns an execution context for this meter request.MeterRequest.BuilderwithIndex(Long index)Sets the index.MeterRequest.BuilderwithScope(MeterScope scope)Sets the scope.MeterRequest.BuilderwithUnit(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(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
-
withAnnotations
MeterRequest.Builder withAnnotations(Annotations annotations)
Sets the annotations.- Parameters:
annotations- annotations- Returns:
- builder object
-
withScope
MeterRequest.Builder withScope(MeterScope scope)
Sets the scope.- Parameters:
scope- a meter scope- Returns:
- this
-
withIndex
MeterRequest.Builder withIndex(Long index)
Sets the index.- Parameters:
index- an optional index- 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
-
-