Interface TokenBucket
- 
- All Known Implementing Classes:
- DefaultTokenBucket
 
 @Beta public interface TokenBucketGeneric abstraction for a token bucket which can mark and/or discard traffic. Each token bucket in ONOS is made up of a set of attributes which identifies the type.
- 
- 
Nested Class SummaryNested Classes Modifier and Type Interface Description static classTokenBucket.ActionAction applied to the exceeding traffic.static interfaceTokenBucket.BuilderToken bucket builder.static classTokenBucket.TypeToken bucket type.
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description TokenBucket.Actionaction()Action used by this token bucket for the exceeding traffic.longburstSize()Maximum burst size subject to the SLAs specified for this token bucket.shortdscp()Dscp value, it meaning depends on the used marking.longprocessedBytes()Stats which reports how many bytes have been processed so far.longprocessedPackets()Stats which reports how many packets have been processed so far.longrate()Rate of traffic subject to the SLAs specified for this token bucket.TokenBucket.Typetype()Token bucket type.
 
- 
- 
- 
Field Detail- 
MAX_DSCPstatic final short MAX_DSCP Upper bound for DSCP.- See Also:
- Constant Field Values
 
 - 
MIN_DSCPstatic final short MIN_DSCP Lower bound for DSCP.- See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
ratelong rate() Rate of traffic subject to the SLAs specified for this token bucket.- Returns:
- the rate value
 
 - 
burstSizelong burstSize() Maximum burst size subject to the SLAs specified for this token bucket.- Returns:
- the burst size in bytes
 
 - 
actionTokenBucket.Action action() Action used by this token bucket for the exceeding traffic.- Returns:
- the type of action
 
 - 
dscpshort dscp() Dscp value, it meaning depends on the used marking.- Returns:
- the dscp value for this token bucket
 
 - 
typeTokenBucket.Type type() Token bucket type.- Returns:
- the token bucket type
 
 - 
processedPacketslong processedPackets() Stats which reports how many packets have been processed so far. Availability of this information depends on the technology used for the implementation of the policer.- Returns:
- the processed packets
 
 - 
processedByteslong processedBytes() Stats which reports how many bytes have been processed so far. Availability of this information depends on the technology used for the implementation of the policer.- Returns:
- the processed bytes
 
 
- 
 
-