Show / Hide Table of Contents

Class TokenBucketUtils

Inheritance
System.Object
TokenBucketUtils
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Camille.RiotGames.Util
Assembly: Camille.RiotGames.dll
Syntax
public static class TokenBucketUtils

Methods

| Improve this Doc View Source

AreEquivalent(ITokenBucket, ITokenBucket)

Declaration
public static bool AreEquivalent(ITokenBucket a, ITokenBucket b)
Parameters
Type Name Description
MingweiSamuel.TokenBucket.ITokenBucket a
MingweiSamuel.TokenBucket.ITokenBucket b
Returns
Type Description
System.Boolean
| Improve this Doc View Source

GetAllTokensOrDelay(ITokenBucket[])

Attempts to get a token from every bucket, or no tokens at all. Will synchronize on each instance recursively.

Declaration
public static long GetAllTokensOrDelay(params ITokenBucket[] buckets)
Parameters
Type Name Description
MingweiSamuel.TokenBucket.ITokenBucket[] buckets

Buckets to get tokens from.

Returns
Type Description
System.Int64

-1 if tokens were obtained, otherwise the approximate delay until tokens will be available.

| Improve this Doc View Source

ToLimitString(ITokenBucket)

Declaration
public static string ToLimitString(this ITokenBucket b)
Parameters
Type Name Description
MingweiSamuel.TokenBucket.ITokenBucket b
Returns
Type Description
System.String
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX