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 Summary
Nested 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 Summary
All 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_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
-
-