Packages

abstract class Proxy[A] extends FiberRef[A]

Wraps another FiberRef and delegates all operations to it. Extend this if you need a FiberRef with some specific behavior overridden.

Linear Supertypes
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Proxy
  2. FiberRef
  3. Serializable
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new Proxy(delegate: FiberRef[A])

Type Members

  1. type Patch = FiberRef.Patch

    The type of the patch that describes updates to the value of the FiberRef.

    The type of the patch that describes updates to the value of the FiberRef. In the simple case this will just be a function that sets the value of the FiberRef. In more complex cases this will describe an update to a piece of a whole value, allowing updates to the value by different fibers to be combined in a compositional way when those fibers are joined.

    Definition Classes
    ProxyFiberRef
  2. type Value = A

    The type of the value of the FiberRef.

    The type of the value of the FiberRef.

    Definition Classes
    FiberRef

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def asThreadLocal(implicit trace: Trace, unsafe: Unsafe): UIO[ThreadLocal[A]]

    Returns a ThreadLocal that can be used to interact with this FiberRef from side effecting code.

    Returns a ThreadLocal that can be used to interact with this FiberRef from side effecting code.

    This feature is meant to be used for integration with side effecting code, that needs to access fiber specific data, like MDC contexts and the like. The returned ThreadLocal will be backed by this FiberRef on all threads that are currently managed by ZIO when this feature is enabled using Runtime.enableCurrentFiber, and behave like an ordinary ThreadLocal on all other threads.

    Definition Classes
    FiberRef
  6. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  7. def combine(first: Patch, second: Patch): Patch

    Combines two patches to produce a new patch that describes the updates of the first patch and then the updates of the second patch.

    Combines two patches to produce a new patch that describes the updates of the first patch and then the updates of the second patch. The combine operation should be associative. In addition, if the combine operation is commutative then joining multiple fibers concurrently will result in deterministic FiberRef values.

    Definition Classes
    ProxyFiberRef
  8. val delegate: FiberRef[A]
  9. def delete(implicit trace: Trace): UIO[Unit]
    Definition Classes
    FiberRef
  10. def diff(oldValue: Value, newValue: Value): Patch

    Constructs a patch describing the updates to a value from an old value and a new value.

    Constructs a patch describing the updates to a value from an old value and a new value.

    Definition Classes
    ProxyFiberRef
  11. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  12. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  13. def fork: Patch

    The initial patch that is applied to the value of the FiberRef when a new fiber is forked.

    The initial patch that is applied to the value of the FiberRef when a new fiber is forked.

    Definition Classes
    ProxyFiberRef
  14. def get(implicit trace: Trace): UIO[A]

    Reads the value associated with the current fiber.

    Reads the value associated with the current fiber. Returns initial value if no value was set or inherited from parent.

    Definition Classes
    FiberRef
  15. final def getAndSet(newValue: A)(implicit trace: Trace): UIO[A]

    Atomically sets the value associated with the current fiber and returns the old value.

    Atomically sets the value associated with the current fiber and returns the old value.

    Definition Classes
    FiberRef
  16. final def getAndUpdate(f: (A) => A)(implicit trace: Trace): UIO[A]

    Atomically modifies the FiberRef with the specified function and returns the old value.

    Atomically modifies the FiberRef with the specified function and returns the old value.

    Definition Classes
    FiberRef
  17. final def getAndUpdateSome(pf: PartialFunction[A, A])(implicit trace: Trace): UIO[A]

    Atomically modifies the FiberRef with the specified partial function and returns the old value.

    Atomically modifies the FiberRef with the specified partial function and returns the old value. If the function is undefined on the current value it doesn't change it.

    Definition Classes
    FiberRef
  18. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  19. def getWith[R, E, B](f: (A) => ZIO[R, E, B])(implicit trace: Trace): ZIO[R, E, B]

    Gets the value associated with the current fiber and uses it to run the specified effect.

    Gets the value associated with the current fiber and uses it to run the specified effect.

    Definition Classes
    FiberRef
  20. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  21. def initial: A

    The initial value of the FiberRef.

    The initial value of the FiberRef.

    Definition Classes
    ProxyFiberRef
  22. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  23. def join(oldValue: Value, newValue: Value): Value
    Definition Classes
    ProxyFiberRef
  24. def locally[R, E, B](newValue: A)(zio: ZIO[R, E, B])(implicit trace: Trace): ZIO[R, E, B]

    Returns a ZIO that runs with value bound to the current fiber.

    Returns a ZIO that runs with value bound to the current fiber.

    Guarantees that fiber data is properly restored via acquireRelease.

    Definition Classes
    FiberRef
  25. final def locallyScoped(value: A)(implicit trace: Trace): ZIO[Scope, Nothing, Unit]

    Returns a scoped workflow that sets the value associated with the curent fiber to the specified value and restores it to its original value when the scope is closed.

    Returns a scoped workflow that sets the value associated with the curent fiber to the specified value and restores it to its original value when the scope is closed.

    Definition Classes
    FiberRef
  26. final def locallyScopedWith(f: (A) => A)(implicit trace: Trace): ZIO[Scope, Nothing, Unit]

    Returns a scoped workflow that updates the value associated with the current fiber using the specified function and restores it to its original value when the scope is closed.

    Returns a scoped workflow that updates the value associated with the current fiber using the specified function and restores it to its original value when the scope is closed.

    Definition Classes
    FiberRef
  27. final def locallyWith[R, E, B](f: (A) => A)(zio: ZIO[R, E, B])(implicit trace: Trace): ZIO[R, E, B]

    Returns a ZIO that runs with f applied to the current fiber.

    Returns a ZIO that runs with f applied to the current fiber.

    Guarantees that fiber data is properly restored via acquireRelease.

    Definition Classes
    FiberRef
  28. def modify[B](f: (A) => (B, A))(implicit trace: Trace): UIO[B]

    Atomically modifies the FiberRef with the specified function, which computes a return value for the modification.

    Atomically modifies the FiberRef with the specified function, which computes a return value for the modification. This is a more powerful version of update.

    Definition Classes
    FiberRef
  29. final def modifySome[B](default: B)(pf: PartialFunction[A, (B, A)])(implicit trace: Trace): UIO[B]

    Atomically modifies the FiberRef with the specified partial function, which computes a return value for the modification if the function is defined in the current value otherwise it returns a default value.

    Atomically modifies the FiberRef with the specified partial function, which computes a return value for the modification if the function is defined in the current value otherwise it returns a default value. This is a more powerful version of updateSome.

    Definition Classes
    FiberRef
  30. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  31. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  32. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  33. def patch(patch: Patch)(oldValue: Value): Value

    Applies a patch to an old value to produce a new value that is equal to the old value with the updates described by the patch.

    Applies a patch to an old value to produce a new value that is equal to the old value with the updates described by the patch.

    Definition Classes
    ProxyFiberRef
  34. final def reset(implicit trace: Trace): UIO[Unit]
    Definition Classes
    FiberRef
  35. def set(value: A)(implicit trace: Trace): UIO[Unit]

    Sets the value associated with the current fiber.

    Sets the value associated with the current fiber.

    Definition Classes
    FiberRef
  36. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  37. def toString(): String
    Definition Classes
    AnyRef → Any
  38. def update(f: (A) => A)(implicit trace: Trace): UIO[Unit]

    Atomically modifies the FiberRef with the specified function.

    Atomically modifies the FiberRef with the specified function.

    Definition Classes
    FiberRef
  39. final def updateAndGet(f: (A) => A)(implicit trace: Trace): UIO[A]

    Atomically modifies the FiberRef with the specified function and returns the result.

    Atomically modifies the FiberRef with the specified function and returns the result.

    Definition Classes
    FiberRef
  40. final def updateSome(pf: PartialFunction[A, A])(implicit trace: Trace): UIO[Unit]

    Atomically modifies the FiberRef with the specified partial function.

    Atomically modifies the FiberRef with the specified partial function. If the function is undefined on the current value it doesn't change it.

    Definition Classes
    FiberRef
  41. final def updateSomeAndGet(pf: PartialFunction[A, A])(implicit trace: Trace): UIO[A]

    Atomically modifies the FiberRef with the specified partial function.

    Atomically modifies the FiberRef with the specified partial function. If the function is undefined on the current value it returns the old value without changing it.

    Definition Classes
    FiberRef
  42. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  43. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  44. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

    (Since version 9)

Inherited from FiberRef[A]

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped