TokenBucket Class |
Namespace: Akka.Util
The TokenBucket type exposes the following members.
Name | Description | |
---|---|---|
TokenBucket |
Initializes a new instance of the TokenBucket class.
|
Name | Description | |
---|---|---|
CurrentTime |
The current time in ticks. The returned value is monotonic, might wrap over and has no relationship with wall-clock.
|
Name | Description | |
---|---|---|
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
Init |
This method must be called before the token bucket can be used.
| |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
Offer |
Call this (side-effecting) method whenever an element should be passed through the token-bucket. This method
will return the number of nanoseconds the element needs to be delayed to conform with the token bucket parameters.
Returns zero if the element can be emitted immediately. The method does not handle overflow, if an element is to
be delayed longer in nanoseconds than what can be represented as a positive Long then an undefined value is returned.
If a non-zero value is returned, it is the responsibility of the caller to not call this method before the
returned delay has been elapsed (but can be called later). This class does not check or protect against early
calls.
| |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
Name | Description | |
---|---|---|
AsInstanceOfT |
TBD
(Defined by Extensions.) | |
Match | Overloaded.
Matches the specified target.
(Defined by PatternMatch.) | |
MatchT | Overloaded.
Matches the specified target and return a result of target processing.
(Defined by PatternMatch.) |