Package org.onosproject.net.meter
Class DefaultMeter
- java.lang.Object
- 
- org.onosproject.net.AbstractAnnotated
- 
- org.onosproject.net.meter.DefaultMeter
 
 
- 
- All Implemented Interfaces:
- Annotated,- Meter,- MeterEntry,- PiTranslatable
 
 public final class DefaultMeter extends AbstractAnnotated implements Meter, MeterEntry A default implementation of a meter.
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classDefaultMeter.Builder- 
Nested classes/interfaces inherited from interface org.onosproject.net.meter.MeterMeter.Unit
 
- 
 - 
Method SummaryAll 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 DefaultMeter.Builderbuilder()longbytesSeen()Number of bytes processed by this meter.DeviceIddeviceId()The target device for this meter.booleanequals(Object o)inthashCode()MeterIdid()This meters id.booleanisBurst()Signals whether this meter applies to bursts only.longlife()The lifetime in seconds of this meter.MeterCellIdmeterCellId()Returns the meter cell identifier of this meter.longpacketsSeen()Number of packets processed by this meter.longreferenceCount()The number of flows pointing to this meter.voidsetLife(long life)Set the amount of time the meter has existed in seconds.voidsetProcessedBytes(long bytes)Updates the number of bytes seen by the meter.voidsetProcessedPackets(long packets)Updates the number of packets seen by this meter.voidsetReferenceCount(long count)Sets the number of flows which are using this meter.voidsetState(MeterState state)Updates the state of this meter.MeterStatestate()Fetches the state of this meter.StringtoString()Meter.Unitunit()The unit used within this meter.- 
Methods inherited from class org.onosproject.net.AbstractAnnotatedannotations
 - 
Methods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, wait
 - 
Methods inherited from interface org.onosproject.net.Annotatedannotations
 
- 
 
- 
- 
- 
Method Detail- 
deviceIdpublic DeviceId deviceId() Description copied from interface:MeterThe target device for this meter.
 - 
meterCellIdpublic MeterCellId meterCellId() Description copied from interface:MeterReturns the meter cell identifier of this meter.- Specified by:
- meterCellIdin interface- Meter
- Returns:
- a meter identifier
 
 - 
appIdpublic ApplicationId appId() Description copied from interface:MeterThe id of the application which created this meter. Could be null if the meter is read from the controller southbound.
 - 
unitpublic Meter.Unit unit() Description copied from interface:MeterThe unit used within this meter.
 - 
isBurstpublic boolean isBurst() Description copied from interface:MeterSignals whether this meter applies to bursts only.
 - 
bandspublic Collection<Band> bands() Description copied from interface:MeterThe collection of bands to apply on the dataplane.
 - 
statepublic MeterState state() Description copied from interface:MeterFetches the state of this meter.
 - 
lifepublic long life() Description copied from interface:MeterThe lifetime in seconds of this meter.
 - 
referenceCountpublic long referenceCount() Description copied from interface:MeterThe number of flows pointing to this meter.- Specified by:
- referenceCountin interface- Meter
- Returns:
- a reference count
 
 - 
packetsSeenpublic long packetsSeen() Description copied from interface:MeterNumber of packets processed by this meter.- Specified by:
- packetsSeenin interface- Meter
- Returns:
- a packet count
 
 - 
bytesSeenpublic long bytesSeen() Description copied from interface:MeterNumber of bytes processed by this meter.
 - 
builderpublic static DefaultMeter.Builder builder() 
 - 
setStatepublic void setState(MeterState state) Description copied from interface:MeterEntryUpdates the state of this meter.- Specified by:
- setStatein interface- MeterEntry
- Parameters:
- state- a meter state
 
 - 
setLifepublic void setLife(long life) Description copied from interface:MeterEntrySet the amount of time the meter has existed in seconds.- Specified by:
- setLifein interface- MeterEntry
- Parameters:
- life- number of seconds
 
 - 
setReferenceCountpublic void setReferenceCount(long count) Description copied from interface:MeterEntrySets the number of flows which are using this meter.- Specified by:
- setReferenceCountin interface- MeterEntry
- Parameters:
- count- a reference count.
 
 - 
setProcessedPacketspublic void setProcessedPackets(long packets) Description copied from interface:MeterEntryUpdates the number of packets seen by this meter.- Specified by:
- setProcessedPacketsin interface- MeterEntry
- Parameters:
- packets- a packet count.
 
 - 
setProcessedBytespublic void setProcessedBytes(long bytes) Description copied from interface:MeterEntryUpdates the number of bytes seen by the meter.- Specified by:
- setProcessedBytesin interface- MeterEntry
- Parameters:
- bytes- a byte counter.
 
 
- 
 
-