object Monitor extends Monitor
Defines the (Future)-Local
monitor as well as some monitor
utilities.
Java users should use the Monitors
class.
- Alphabetic
- By Inheritance
- Monitor
- Monitor
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
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
- def andThen(next: Monitor): Monitor
A new monitor which first handles the exception with
this
, then passes it ontonext
unconditionally.A new monitor which first handles the exception with
this
, then passes it ontonext
unconditionally. The new monitor handles the exception if eitherthis
ornext
does.- Definition Classes
- Monitor
- def apply(f: => Unit): Unit
Run the computation
f
in the context of the current Local monitor. - final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- val catcher: PartialFunction[Throwable, Unit]
An exception catcher that attempts to handle exceptions with the current monitor.
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- 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])
- def get: Monitor
Get the current Local monitor or a NullMonitor if none has been set.
Get the current Local monitor or a NullMonitor if none has been set.
- See also
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def getOption: Option[Monitor]
Get the current Local monitor or
None
if none has beenset
. - def handle(exc: Throwable): Boolean
Handle
exc
with the current Local monitor.Handle
exc
with the current Local monitor. If the Local monitor fails to handle the exception, it is handled by the RootMonitor.- returns
whether the exception was handled by this Monitor
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def isActive: Boolean
Checks whether or not monitoring is activated, meaning that the currently-set Monitor is non-null.
Checks whether or not monitoring is activated, meaning that the currently-set Monitor is non-null.
- returns
true if currently-set Monitor is the NullMonitor. False otherwise.
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def mk(f: PartialFunction[Throwable, Boolean]): Monitor
Create a new monitor from a partial function.
- 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()
- def orElse(next: Monitor): Monitor
A new monitor which, if
this
fails to handle the exception, attempts to letnext
handle it.A new monitor which, if
this
fails to handle the exception, attempts to letnext
handle it.- Definition Classes
- Monitor
- def restoring[T](f: => T): T
Restore the Local monitor after running computation
f
Restore the Local monitor after running computation
f
- Annotations
- @inline()
- def set(m: Monitor): Unit
Set the Local monitor.
- def setOption(monitor: Option[Monitor]): Unit
Set the Local monitor.
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- def tryHandle(exc: Throwable): Try[Unit]
An implementation widget: attempts to handle
exc
returning acom.twitter.util.Try[Unit]
.An implementation widget: attempts to handle
exc
returning acom.twitter.util.Try[Unit]
. If the exception is unhandled, we returnThrow(exc)
, if the handler throws an exception, we wrap it in a MonitorException.- Attributes
- protected
- Definition Classes
- Monitor
- def using[T](m: Monitor)(f: => T): T
Compute
f
with the Local monitor set tom
Compute
f
with the Local monitor set tom
- Annotations
- @inline()
- 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()