com.digitaltangible.tokenbucket
package com.digitaltangible.tokenbucket
Members list
Type members
Classlikes
trait Clock
For mocking the current time.
For mocking the current time.
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
object CurrentTimeClock.type
object CurrentTimeClock extends Clock, Serializable
Attributes
- Supertypes
- Self type
-
CurrentTimeClock.type
class TokenBucketGroup(val size: Long, val rate: Double, clock: Clock) extends Serializable
TokenBucketGroup which synchronizes the bucket token requests. Token Bucket implementation as described here http://en.wikipedia.org/wiki/Token_bucket
TokenBucketGroup which synchronizes the bucket token requests. Token Bucket implementation as described here http://en.wikipedia.org/wiki/Token_bucket
Value parameters
- clock
-
for mocking the current time.
- rate
-
refill rate in tokens per second
- size
-
bucket size
Attributes
- Supertypes
-
trait Serializableclass Objecttrait Matchableclass Any
In this article