Interface TokenBucket.Builder
- 
- All Known Implementing Classes:
- DefaultTokenBucket.Builder
 - Enclosing interface:
- TokenBucket
 
 public static interface TokenBucket.BuilderToken bucket builder.
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description TokenBucketbuild()Builds the token bucket based on the specified parameters when possible.TokenBucket.BuilderwithAction(TokenBucket.Action action)Assigns the action to this token bucket.TokenBucket.BuilderwithBurstSize(long burstSize)Assigns the burst size to this token bucket.TokenBucket.BuilderwithDscp(short dscp)Assigns the dscp value to this token bucket.TokenBucket.BuilderwithRate(long rate)Assigns the rate to this token bucket.TokenBucket.BuilderwithType(TokenBucket.Type type)Assigns the type to this token bucket.
 
- 
- 
- 
Method Detail- 
withRateTokenBucket.Builder withRate(long rate) Assigns the rate to this token bucket.- Parameters:
- rate- a rate value
- Returns:
- this
 
 - 
withBurstSizeTokenBucket.Builder withBurstSize(long burstSize) Assigns the burst size to this token bucket. Default to 2 * 1500 bytes.- Parameters:
- burstSize- a burst size
- Returns:
- this
 
 - 
withActionTokenBucket.Builder withAction(TokenBucket.Action action) Assigns the action to this token bucket.Note: mandatory setter for this builder - Parameters:
- action- an action
- Returns:
- this
 
 - 
withDscpTokenBucket.Builder withDscp(short dscp) Assigns the dscp value to this token bucket.- Parameters:
- dscp- a dscp value
- Returns:
- this
 
 - 
withTypeTokenBucket.Builder withType(TokenBucket.Type type) Assigns the type to this token bucket.Note: mandatory setter for this builder - Parameters:
- type- the type
- Returns:
- this
 
 - 
buildTokenBucket build() Builds the token bucket based on the specified parameters when possible.- Returns:
- a token bucket
 
 
- 
 
-