Package org.onosproject.net.meter
Class DefaultMeterRequest
- java.lang.Object
-
- org.onosproject.net.AbstractAnnotated
-
- org.onosproject.net.meter.DefaultMeterRequest
-
- All Implemented Interfaces:
Annotated,MeterRequest
public final class DefaultMeterRequest extends AbstractAnnotated implements MeterRequest
A default implementation of a meter.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDefaultMeterRequest.Builder-
Nested classes/interfaces inherited from interface org.onosproject.net.meter.MeterRequest
MeterRequest.Type
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ApplicationIdappId()The id of the application which created this meter.Collection<Band>bands()The collection of bands to apply on the dataplane.static DefaultMeterRequest.Builderbuilder()Optional<MeterContext>context()Returns the callback context for this meter.DeviceIddeviceId()The target device for this meter.Optional<Long>index()Returns the desired meter index of this meter request.booleanisBurst()Signals whether this meter applies to bursts only.MeterScopescope()Returns the scope of this meter request.StringtoString()Meter.Unitunit()The unit used within this meter.-
Methods inherited from class org.onosproject.net.AbstractAnnotated
annotations
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.onosproject.net.Annotated
annotations
-
-
-
-
Method Detail
-
deviceId
public DeviceId deviceId()
Description copied from interface:MeterRequestThe target device for this meter.- Specified by:
deviceIdin interfaceMeterRequest- Returns:
- a device id
-
appId
public ApplicationId appId()
Description copied from interface:MeterRequestThe id of the application which created this meter.- Specified by:
appIdin interfaceMeterRequest- Returns:
- an application id
-
unit
public Meter.Unit unit()
Description copied from interface:MeterRequestThe unit used within this meter.- Specified by:
unitin interfaceMeterRequest- Returns:
- the unit
-
isBurst
public boolean isBurst()
Description copied from interface:MeterRequestSignals whether this meter applies to bursts only.- Specified by:
isBurstin interfaceMeterRequest- Returns:
- a boolean
-
bands
public Collection<Band> bands()
Description copied from interface:MeterRequestThe collection of bands to apply on the dataplane.- Specified by:
bandsin interfaceMeterRequest- Returns:
- a collection of bands.
-
context
public Optional<MeterContext> context()
Description copied from interface:MeterRequestReturns the callback context for this meter.- Specified by:
contextin interfaceMeterRequest- Returns:
- an optional meter context
-
scope
public MeterScope scope()
Description copied from interface:MeterRequestReturns the scope of this meter request.- Specified by:
scopein interfaceMeterRequest- Returns:
- a meter scope
-
index
public Optional<Long> index()
Description copied from interface:MeterRequestReturns the desired meter index of this meter request.- Specified by:
indexin interfaceMeterRequest- Returns:
- an optional long index
-
builder
public static DefaultMeterRequest.Builder builder()
-
-