Object/Class

monix.execution.misc

Local

Related Docs: class Local | package misc

Permalink

object Local

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Local
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. type Context = Map[Key, _]

    Permalink

    Represents the current state of all locals for a given execution context.

    Represents the current state of all locals for a given execution context.

    This should be treated as an opaque value and direct modifications and access are considered verboten.

  2. final class Key extends Serializable

    Permalink

    Internal — key type used in Context.

  3. class Macros extends InlineMacros with HygieneUtilMacros

    Permalink

    Macros implementations for bind and bindClear.

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def apply[A](default: A): Local[A]

    Permalink

    Builds a new Local with the given default to be returned if a value hasn't been set, or after the local gets cleared.

    Builds a new Local with the given default to be returned if a value hasn't been set, or after the local gets cleared.

    val num = Local(0)
    num() //=> 0
    
    num := 100
    num() //=> 100
    
    num.clear()
    num() //=> 0
  5. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  6. macro def bind[R](ctx: Context)(f: ⇒ R): R

    Permalink

    Execute a block of code using the specified state of Local.Context and restore the current state when complete.

  7. macro def bindClear[R](f: ⇒ R): R

    Permalink

    Execute a block of code with a clear state of Local.Context and restore the current state when complete.

  8. def clearContext(): Unit

    Permalink

    Clear the Local state.

  9. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  10. def closed[R](fn: () ⇒ R): () ⇒ R

    Permalink

    Convert a closure () => R into another closure of the same type whose Local.Context is saved when calling closed and restored upon invocation.

  11. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  12. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  13. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  14. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  15. def getContext(): Context

    Permalink

    Return the state of the current Local state.

  16. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  17. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  18. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  19. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  20. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  21. def setContext(ctx: Context): Unit

    Permalink

    Restore the Local state to a given Context.

  22. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  23. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  24. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  25. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  26. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped