@Beta public final class DefaultPolicer extends java.lang.Object implements Policer, PolicerEntry
| Modifier and Type | Class and Description |
|---|---|
static class |
DefaultPolicer.Builder
Implementation of the policer builder interface.
|
Policer.Unit| Modifier and Type | Method and Description |
|---|---|
ApplicationId |
applicationId()
The id of the application which created this policer.
|
static DefaultPolicer.Builder |
builder()
Returns a new builder reference.
|
java.lang.String |
description()
Brief description of this policer.
|
DeviceId |
deviceId()
The device of this policer, where policing
is applied.
|
boolean |
equals(java.lang.Object o) |
int |
hashCode() |
boolean |
isColorAware()
Indicates if this policer is aware of the marking indication
in the ethernet frames.
|
long |
life()
The lifetime in seconds of this policer.
|
PolicerId |
policerId()
The id of this policer.
|
long |
processedBytes()
Stats which reports how many bytes have been
processed so far.
|
long |
processedPackets()
Stats which reports how many packets have been
processed so far.
|
long |
referenceCount()
Returns how many are referencing this policer.
|
void |
setLife(long l)
Set the amount of time the policer has existed in seconds.
|
void |
setProcessedBytes(long bytes)
Updates the number of bytes seen by the policer.
|
void |
setProcessedPackets(long packets)
Updates the number of packets seen by this policer.
|
void |
setReferenceCount(long count)
Sets how many are using this policer.
|
java.util.Collection<TokenBucket> |
tokenBuckets()
The token buckets used within this policer.
|
java.lang.String |
toString() |
Policer.Unit |
unit()
The unit used within this policer.
|
public DeviceId deviceId()
Policerpublic ApplicationId applicationId()
PolicerapplicationId in interface Policerpublic PolicerId policerId()
Policerpublic boolean isColorAware()
PolicerisColorAware in interface Policerpublic Policer.Unit unit()
Policerpublic java.util.Collection<TokenBucket> tokenBuckets()
PolicertokenBuckets in interface Policerpublic java.lang.String description()
Policerdescription in interface Policerpublic long referenceCount()
PolicerreferenceCount in interface Policerpublic void setReferenceCount(long count)
PolicerEntrysetReferenceCount in interface PolicerEntrycount - a reference count.public long processedPackets()
PolicerprocessedPackets in interface Policerpublic void setProcessedPackets(long packets)
PolicerEntrysetProcessedPackets in interface PolicerEntrypackets - a packet count.public long processedBytes()
PolicerprocessedBytes in interface Policerpublic void setProcessedBytes(long bytes)
PolicerEntrysetProcessedBytes in interface PolicerEntrybytes - a byte counter.public long life()
Policerpublic void setLife(long l)
PolicerEntrysetLife in interface PolicerEntryl - number of secondspublic java.lang.String toString()
toString in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic static DefaultPolicer.Builder builder()