Class ThrottlerTransportAdapter.TokenBucket
java.lang.Object
org.apache.pekko.remote.transport.ThrottlerTransportAdapter.TokenBucket
- All Implemented Interfaces:
- Serializable,- NoSerializationVerificationNeeded,- ThrottlerTransportAdapter.ThrottleMode,- scala.Equals,- scala.Product
- Enclosing class:
- ThrottlerTransportAdapter
public static final class ThrottlerTransportAdapter.TokenBucket
extends Object
implements ThrottlerTransportAdapter.ThrottleMode, scala.Product, Serializable
- See Also:
- 
Constructor SummaryConstructorsConstructorDescriptionTokenBucket(int capacity, double tokensPerSecond, long nanoTimeOfLastSend, int availableTokens) 
- 
Method SummaryModifier and TypeMethodDescriptionintbooleanintcapacity()copy(int capacity, double tokensPerSecond, long nanoTimeOfLastSend, int availableTokens) intdoublelongintbooleaninthashCode()longintproductElement(int x$1) productElementName(int x$1) scala.collection.Iterator<Object>scala.concurrent.duration.FiniteDurationtimeToAvailable(long currentNanoTime, int tokens) doubletoString()scala.Tuple2<ThrottlerTransportAdapter.ThrottleMode,Object> tryConsumeTokens(long nanoTimeOfSend, int tokens) Methods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface scala.ProductproductElementNames
- 
Constructor Details- 
TokenBucketpublic TokenBucket(int capacity, double tokensPerSecond, long nanoTimeOfLastSend, int availableTokens) 
 
- 
- 
Method Details- 
capacitypublic int capacity()
- 
tokensPerSecondpublic double tokensPerSecond()
- 
nanoTimeOfLastSendpublic long nanoTimeOfLastSend()
- 
availableTokenspublic int availableTokens()
- 
tryConsumeTokenspublic scala.Tuple2<ThrottlerTransportAdapter.ThrottleMode,Object> tryConsumeTokens(long nanoTimeOfSend, int tokens) - Specified by:
- tryConsumeTokensin interface- ThrottlerTransportAdapter.ThrottleMode
 
- 
timeToAvailablepublic scala.concurrent.duration.FiniteDuration timeToAvailable(long currentNanoTime, int tokens) - Specified by:
- timeToAvailablein interface- ThrottlerTransportAdapter.ThrottleMode
 
- 
copypublic ThrottlerTransportAdapter.TokenBucket copy(int capacity, double tokensPerSecond, long nanoTimeOfLastSend, int availableTokens) 
- 
copy$default$1public int copy$default$1()
- 
copy$default$2public double copy$default$2()
- 
copy$default$3public long copy$default$3()
- 
copy$default$4public int copy$default$4()
- 
productPrefix- Specified by:
- productPrefixin interface- scala.Product
 
- 
productAritypublic int productArity()- Specified by:
- productArityin interface- scala.Product
 
- 
productElement- Specified by:
- productElementin interface- scala.Product
 
- 
productIterator- Specified by:
- productIteratorin interface- scala.Product
 
- 
canEqual- Specified by:
- canEqualin interface- scala.Equals
 
- 
productElementName- Specified by:
- productElementNamein interface- scala.Product
 
- 
hashCodepublic int hashCode()
- 
toString
- 
equals
 
-