Class TokenBucket
Applies token-bucket throttling to introduce latency to a connection
Implements
Inherited Members
Namespace: Akka.Remote.Transport
Assembly: Akka.Remote.dll
Syntax
public sealed class TokenBucket : ThrottleMode, INoSerializationVerificationNeeded
Constructors
| Improve this Doc View SourceTokenBucket(Int32, Double, Int64, Int32)
TBD
Declaration
public TokenBucket(int capacity, double tokensPerSecond, long nanoTimeOfLastSend, int availableTokens)
Parameters
Type | Name | Description |
---|---|---|
Int32 | capacity | TBD |
Double | tokensPerSecond | TBD |
Int64 | nanoTimeOfLastSend | TBD |
Int32 | availableTokens | TBD |
Methods
| Improve this Doc View SourceEquals(Object)
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
Object | obj |
Returns
Type | Description |
---|---|
Boolean |
Overrides
| Improve this Doc View SourceGetHashCode()
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
Int32 |
Overrides
| Improve this Doc View SourceTimeToAvailable(Int64, Int32)
TBD
Declaration
public override TimeSpan TimeToAvailable(long currentNanoTime, int tokens)
Parameters
Type | Name | Description |
---|---|---|
Int64 | currentNanoTime | TBD |
Int32 | tokens | TBD |
Returns
Type | Description |
---|---|
TimeSpan | TBD |
Overrides
| Improve this Doc View SourceTryConsumeTokens(Int64, Int32)
TBD
Declaration
public override (ThrottleMode, bool) TryConsumeTokens(long nanoTimeOfSend, int tokens)
Parameters
Type | Name | Description |
---|---|---|
Int64 | nanoTimeOfSend | TBD |
Int32 | tokens | TBD |
Returns
Type | Description |
---|---|
System.ValueTuple<ThrottleMode, Boolean> | TBD |
Overrides
Operators
| Improve this Doc View SourceEquality(TokenBucket, TokenBucket)
Compares two specified TokenBucket for equality.
Declaration
public static bool operator ==(TokenBucket left, TokenBucket right)
Parameters
Type | Name | Description |
---|---|---|
TokenBucket | left | The first TokenBucket used for comparison |
TokenBucket | right | The second TokenBucket used for comparison |
Returns
Type | Description |
---|---|
Boolean |
|
Inequality(TokenBucket, TokenBucket)
Compares two specified TokenBucket for inequality.
Declaration
public static bool operator !=(TokenBucket left, TokenBucket right)
Parameters
Type | Name | Description |
---|---|---|
TokenBucket | left | The first TokenBucket used for comparison |
TokenBucket | right | The second TokenBucket used for comparison |
Returns
Type | Description |
---|---|
Boolean |
|