abstract class SlowProbeProxyTimer extends ProxyTimer
An abstract ProxyTimer that provides callback methods which are called when a task takes longer than the specified maximum runtime or if a task is observed to be taking longer than the specified maximum runtime.
- Note
Observation of slow task execution is performed when scheduling more work to avoid the overhead of another thread or timer checking on tasks. This results in lower overhead but means that slow running tasks may not be observed while executing. However, they will trigger a callback to the
,slowTaskCompleted
regardless of whether additional work is scheduled.This makes assumptions that the underlying
Timer
will execute tasks sequentially in order to catch slow running tasks during execution. If the underlyingTimer
executes tasks in parallel the callbackslowTaskExecuting
will become unreliable. However, theslowTaskCompleted
callback will remain reliable but must be a thread-safe implementation.
- Alphabetic
- By Inheritance
- SlowProbeProxyTimer
- ProxyTimer
- Timer
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Abstract Value Members
- abstract def self: Timer
The underlying Timer instance used for proxying methods.
The underlying Timer instance used for proxying methods.
- Attributes
- protected
- Definition Classes
- ProxyTimer
- abstract def slowTaskCompleted(elapsed: Duration): Unit
Called when a task takes longer than the specified maximum duration
Called when a task takes longer than the specified maximum duration
- Attributes
- protected
- abstract def slowTaskExecuting(elapsed: Duration): Unit
Called when a task is observed to be executing longer than the specified maximum duration
Called when a task is observed to be executing longer than the specified maximum duration
- Attributes
- protected
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[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def doAt[A](time: Time)(f: => A): Future[A]
Performs an operation at the specified time.
- def doLater[A](delay: Duration)(f: => A): Future[A]
Performs an operation after the specified delay.
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def schedule(period: Duration)(f: => Unit): TimerTask
Run
f
every elapsedperiod
, startingperiod
from now.Run
f
every elapsedperiod
, startingperiod
from now.- Definition Classes
- Timer
- final def schedule(when: Time, period: Duration)(f: => Unit): TimerTask
Run
f
at timewhen
; subsequently runf
at every elapsedperiod
.Run
f
at timewhen
; subsequently runf
at every elapsedperiod
.- Definition Classes
- Timer
- Note
If
,period
is negative or undefined, the timer task will be rescheduled immediately (i.e.,period
will be treated as Duration.Zero).If
when
is negative or undefined, it will be treated as Time.epoch.
- final def schedule(when: Time)(f: => Unit): TimerTask
Run
f
at timewhen
.Run
f
at timewhen
.- Definition Classes
- Timer
- Note
If
when
is negative or undefined, it will be treated as Time.epoch.
- def scheduleOnce(when: Time)(f: => Unit): TimerTask
- Attributes
- protected
- Definition Classes
- SlowProbeProxyTimer → ProxyTimer → Timer
- def schedulePeriodically(when: Time, period: Duration)(f: => Unit): TimerTask
- Attributes
- protected
- Definition Classes
- SlowProbeProxyTimer → ProxyTimer → Timer
- def stop(): Unit
Stop the timer.
Stop the timer. Pending tasks are cancelled. The timer is unusable after being stopped.
- Definition Classes
- ProxyTimer → Timer
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- SlowProbeProxyTimer → AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()