class
Throttler extends AnyRef
Instance Constructors
-
new
Throttler(desiredRatePerSec: Double)
-
new
Throttler(desiredRatePerSec: Double, throttleDown: Boolean)
-
new
Throttler(desiredRatePerSec: Double, checkIntervalMs: Long, throttleDown: Boolean, time: Time)
Value Members
-
final
def
!=(arg0: AnyRef): Boolean
-
final
def
!=(arg0: Any): Boolean
-
final
def
##(): Int
-
final
def
==(arg0: AnyRef): Boolean
-
final
def
==(arg0: Any): Boolean
-
final
def
asInstanceOf[T0]: T0
-
val
checkIntervalMs: Long
-
def
clone(): AnyRef
-
val
desiredRatePerSec: Double
-
final
def
eq(arg0: AnyRef): Boolean
-
def
equals(arg0: Any): Boolean
-
def
finalize(): Unit
-
final
def
getClass(): Class[_]
-
def
hashCode(): Int
-
final
def
isInstanceOf[T0]: Boolean
-
def
maybeThrottle(observed: Double): Unit
-
final
def
ne(arg0: AnyRef): Boolean
-
final
def
notify(): Unit
-
final
def
notifyAll(): Unit
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
-
val
throttleDown: Boolean
-
val
time: Time
-
def
toString(): String
-
final
def
wait(): Unit
-
final
def
wait(arg0: Long, arg1: Int): Unit
-
final
def
wait(arg0: Long): Unit
Inherited from AnyRef
Inherited from Any
A class to measure and throttle the rate of some process. The throttler takes a desired rate-per-second (the units of the process don't matter, it could be bytes or a count of some other thing), and will sleep for an appropraite amount of time when maybeThrottle() is called to attain the desired rate.