Try to consume count tokens.
Try to consume count tokens. If the returned value is negative, no tokens are consumed.
actorRef returned by create
bucket key
count of tokens to consume, pass 0 to query just the current level without consuming a token. No negative values allowed.
akka timeout
(remainingTokens - count), if negative no tokens are consumed.
Creates the actor and bucket group.
Creates the actor and bucket group.
actor system
bucket size. Has to be in the range 0 to 1000.
refill rate in tokens per second. Has to be in the range 0.000001f to 1000.
for mocking the current time.
akka execution context
actorRef, needed to call consume later.