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 class
DefaultMeterRequest.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 ApplicationId
appId()
The id of the application which created this meter.Collection<Band>
bands()
The collection of bands to apply on the dataplane.static DefaultMeterRequest.Builder
builder()
Optional<MeterContext>
context()
Returns the callback context for this meter.DeviceId
deviceId()
The target device for this meter.Optional<Long>
index()
Returns the desired meter index of this meter request.boolean
isBurst()
Signals whether this meter applies to bursts only.MeterScope
scope()
Returns the scope of this meter request.String
toString()
Meter.Unit
unit()
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:MeterRequest
The target device for this meter.- Specified by:
deviceId
in interfaceMeterRequest
- Returns:
- a device id
-
appId
public ApplicationId appId()
Description copied from interface:MeterRequest
The id of the application which created this meter.- Specified by:
appId
in interfaceMeterRequest
- Returns:
- an application id
-
unit
public Meter.Unit unit()
Description copied from interface:MeterRequest
The unit used within this meter.- Specified by:
unit
in interfaceMeterRequest
- Returns:
- the unit
-
isBurst
public boolean isBurst()
Description copied from interface:MeterRequest
Signals whether this meter applies to bursts only.- Specified by:
isBurst
in interfaceMeterRequest
- Returns:
- a boolean
-
bands
public Collection<Band> bands()
Description copied from interface:MeterRequest
The collection of bands to apply on the dataplane.- Specified by:
bands
in interfaceMeterRequest
- Returns:
- a collection of bands.
-
context
public Optional<MeterContext> context()
Description copied from interface:MeterRequest
Returns the callback context for this meter.- Specified by:
context
in interfaceMeterRequest
- Returns:
- an optional meter context
-
scope
public MeterScope scope()
Description copied from interface:MeterRequest
Returns the scope of this meter request.- Specified by:
scope
in interfaceMeterRequest
- Returns:
- a meter scope
-
index
public Optional<Long> index()
Description copied from interface:MeterRequest
Returns the desired meter index of this meter request.- Specified by:
index
in interfaceMeterRequest
- Returns:
- an optional long index
-
builder
public static DefaultMeterRequest.Builder builder()
-
-