public final class DefaultMeter extends Object implements Meter, MeterEntry
| Modifier and Type | Class and Description |
|---|---|
static class |
DefaultMeter.Builder |
Meter.Unit| Modifier and Type | Method and 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 DefaultMeter.Builder |
builder() |
long |
bytesSeen()
Number of bytes processed by this meter.
|
DeviceId |
deviceId()
The target device for this meter.
|
boolean |
equals(Object o) |
int |
hashCode() |
MeterId |
id()
This meters id.
|
boolean |
isBurst()
Signals whether this meter applies to bursts only.
|
long |
life()
The lifetime in seconds of this meter.
|
MeterCellId |
meterCellId()
Returns the meter cell identifier of this meter.
|
long |
packetsSeen()
Number of packets processed by this meter.
|
long |
referenceCount()
The number of flows pointing to this meter.
|
void |
setLife(long life)
Set the amount of time the meter has existed in seconds.
|
void |
setProcessedBytes(long bytes)
Updates the number of bytes seen by the meter.
|
void |
setProcessedPackets(long packets)
Updates the number of packets seen by this meter.
|
void |
setReferenceCount(long count)
Sets the number of flows which are using this meter.
|
void |
setState(MeterState state)
Updates the state of this meter.
|
MeterState |
state()
Fetches the state of this meter.
|
String |
toString() |
Meter.Unit |
unit()
The unit used within this meter.
|
public DeviceId deviceId()
Meterpublic MeterCellId meterCellId()
MetermeterCellId in interface Meterpublic ApplicationId appId()
Meterpublic Meter.Unit unit()
Meterpublic boolean isBurst()
Meterpublic Collection<Band> bands()
Meterpublic MeterState state()
Meterpublic long life()
Meterpublic long referenceCount()
MeterreferenceCount in interface Meterpublic long packetsSeen()
MeterpacketsSeen in interface Meterpublic long bytesSeen()
Meterpublic static DefaultMeter.Builder builder()
public void setState(MeterState state)
MeterEntrysetState in interface MeterEntrystate - a meter statepublic void setLife(long life)
MeterEntrysetLife in interface MeterEntrylife - number of secondspublic void setReferenceCount(long count)
MeterEntrysetReferenceCount in interface MeterEntrycount - a reference count.public void setProcessedPackets(long packets)
MeterEntrysetProcessedPackets in interface MeterEntrypackets - a packet count.public void setProcessedBytes(long bytes)
MeterEntrysetProcessedBytes in interface MeterEntrybytes - a byte counter.