public static final class DefaultMeterRequest.Builder extends Object implements MeterRequest.Builder
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and 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(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.
|
public MeterRequest.Builder forDevice(DeviceId deviceId)
MeterRequest.Builder
forDevice
in interface MeterRequest.Builder
deviceId
- a device idpublic MeterRequest.Builder fromApp(ApplicationId appId)
MeterRequest.Builder
fromApp
in interface MeterRequest.Builder
appId
- an application idpublic MeterRequest.Builder withUnit(Meter.Unit unit)
MeterRequest.Builder
withUnit
in interface MeterRequest.Builder
unit
- a unitpublic MeterRequest.Builder burst()
MeterRequest.Builder
burst
in interface MeterRequest.Builder
public MeterRequest.Builder withBands(Collection<Band> bands)
MeterRequest.Builder
withBands
in interface MeterRequest.Builder
bands
- a collection of bandspublic MeterRequest.Builder withContext(MeterContext context)
MeterRequest.Builder
withContext
in interface MeterRequest.Builder
context
- a meter contextpublic MeterRequest add()
MeterRequest.Builder
add
in interface MeterRequest.Builder
public MeterRequest remove()
MeterRequest.Builder
remove
in interface MeterRequest.Builder