Interface TokenBucket
-
- All Known Implementing Classes:
DefaultTokenBucket
@Beta public interface TokenBucket
Generic 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 Summary
Nested Classes Modifier and Type Interface Description static class
TokenBucket.Action
Action applied to the exceeding traffic.static interface
TokenBucket.Builder
Token bucket builder.static class
TokenBucket.Type
Token bucket type.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description TokenBucket.Action
action()
Action used by this token bucket for the exceeding traffic.long
burstSize()
Maximum burst size subject to the SLAs specified for this token bucket.short
dscp()
Dscp value, it meaning depends on the used marking.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
rate()
Rate of traffic subject to the SLAs specified for this token bucket.TokenBucket.Type
type()
Token bucket type.
-
-
-
Field Detail
-
MAX_DSCP
static final short MAX_DSCP
Upper bound for DSCP.- See Also:
- Constant Field Values
-
MIN_DSCP
static final short MIN_DSCP
Lower bound for DSCP.- See Also:
- Constant Field Values
-
-
Method Detail
-
rate
long rate()
Rate of traffic subject to the SLAs specified for this token bucket.- Returns:
- the rate value
-
burstSize
long burstSize()
Maximum burst size subject to the SLAs specified for this token bucket.- Returns:
- the burst size in bytes
-
action
TokenBucket.Action action()
Action used by this token bucket for the exceeding traffic.- Returns:
- the type of action
-
dscp
short dscp()
Dscp value, it meaning depends on the used marking.- Returns:
- the dscp value for this token bucket
-
type
TokenBucket.Type type()
Token bucket type.- Returns:
- the token bucket type
-
processedPackets
long 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
-
processedBytes
long 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
-
-