trait Throttler extends ThrottleControl
A trait that ensures a series of tasks run no faster than the throttle setting. Callers schedule tasks by calling the run method. If at least throttle setting nanoseconds have passed since the last task completed, the supplied function is immediately executed, otherwise it is scheduled for execution once throttle nanoseconds have expired. Tasks scheduled at the same time for later execution will be executed in a FIFO manner. Throttler guarantees that all tasks will have at least throttle nanoseconds separating their completion. However, it can not guarantee that the elapsed time between tasks will not be greater than the throttle setting.
- Alphabetic
- By Inheritance
- Throttler
- ThrottleControl
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Abstract Value Members
-
abstract
def
adjustThrottle_ns(adjust_ns: Long): Long
Modify the throttle setting
-
abstract
def
run[X](task: ⇒ Future[X])(implicit ec: ExecutionContext): DeferredFuture[X]
- returns
a Future that completes once at least throttle_ns nanoseconds have expired since the last task AND task completes
-
abstract
def
throttle_ns(throttle_ns: Long): Long
Set the throttle setting
-
abstract
def
throttle_ns: Long
- returns
the throttle period in nanoseconds
- Definition Classes
- ThrottleControl
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )