@Beta public final class DefaultPolicer extends 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. 
 | 
String | 
description()
Brief description of this policer. 
 | 
DeviceId | 
deviceId()
The device of this policer, where policing
 is applied. 
 | 
boolean | 
equals(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. 
 | 
Collection<TokenBucket> | 
tokenBuckets()
The token buckets used within this policer. 
 | 
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 Collection<TokenBucket> tokenBuckets()
PolicertokenBuckets in interface Policerpublic 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 static DefaultPolicer.Builder builder()