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 Details

    • TokenBucket

      public TokenBucket(int capacity, double tokensPerSecond, long nanoTimeOfLastSend, int availableTokens)
  • Method Details

    • capacity

      public int capacity()
    • tokensPerSecond

      public double tokensPerSecond()
    • nanoTimeOfLastSend

      public long nanoTimeOfLastSend()
    • availableTokens

      public int availableTokens()
    • tryConsumeTokens

      public scala.Tuple2<ThrottlerTransportAdapter.ThrottleMode,Object> tryConsumeTokens(long nanoTimeOfSend, int tokens)
      Specified by:
      tryConsumeTokens in interface ThrottlerTransportAdapter.ThrottleMode
    • timeToAvailable

      public scala.concurrent.duration.FiniteDuration timeToAvailable(long currentNanoTime, int tokens)
      Specified by:
      timeToAvailable in interface ThrottlerTransportAdapter.ThrottleMode
    • copy

      public ThrottlerTransportAdapter.TokenBucket copy(int capacity, double tokensPerSecond, long nanoTimeOfLastSend, int availableTokens)
    • copy$default$1

      public int copy$default$1()
    • copy$default$2

      public double copy$default$2()
    • copy$default$3

      public long copy$default$3()
    • copy$default$4

      public int copy$default$4()
    • productPrefix

      public String productPrefix()
      Specified by:
      productPrefix in interface scala.Product
    • productArity

      public int productArity()
      Specified by:
      productArity in interface scala.Product
    • productElement

      public Object productElement(int x$1)
      Specified by:
      productElement in interface scala.Product
    • productIterator

      public scala.collection.Iterator<Object> productIterator()
      Specified by:
      productIterator in interface scala.Product
    • canEqual

      public boolean canEqual(Object x$1)
      Specified by:
      canEqual in interface scala.Equals
    • productElementName

      public String productElementName(int x$1)
      Specified by:
      productElementName in interface scala.Product
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object x$1)
      Specified by:
      equals in interface scala.Equals
      Overrides:
      equals in class Object