public static interface TokenBucket.Builder
| Modifier and Type | Method and Description |
|---|---|
TokenBucket |
build()
Builds the token bucket based on the specified
parameters when possible.
|
TokenBucket.Builder |
withAction(TokenBucket.Action action)
Assigns the action to this token bucket.
|
TokenBucket.Builder |
withBurstSize(long burstSize)
Assigns the burst size to this token bucket.
|
TokenBucket.Builder |
withDscp(short dscp)
Assigns the dscp value to this token bucket.
|
TokenBucket.Builder |
withRate(long rate)
Assigns the rate to this token bucket.
|
TokenBucket.Builder withRate(long rate)
rate - a rate valueTokenBucket.Builder withBurstSize(long burstSize)
burstSize - a burst sizeTokenBucket.Builder withAction(TokenBucket.Action action)
Note: mandatory setter for this builder
action - an actionTokenBucket.Builder withDscp(short dscp)
dscp - a dscp valueTokenBucket build()