Class

zio.FiberRef

Proxy

Related Doc: package FiberRef

Permalink

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. Serializable
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

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

    Permalink

Type Members

  1. type Patch = FiberRef.Patch

    Permalink

    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

    Permalink

    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

    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. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def asThreadLocal(implicit trace: Trace, unsafe: Unsafe): UIO[ThreadLocal[A]]

    Permalink

    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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. def combine(first: Patch, second: Patch): Patch

    Permalink

    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]

    Permalink
  9. def delete(implicit trace: Trace): UIO[Unit]

    Permalink
    Definition Classes
    FiberRef
  10. def diff(oldValue: Value, newValue: Value): Patch

    Permalink

    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

    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. def fork: Patch

    Permalink

    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
  15. def get(implicit trace: Trace): UIO[A]

    Permalink

    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
  16. final def getAndSet(newValue: A)(implicit trace: Trace): UIO[A]

    Permalink

    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
  17. final def getAndUpdate(f: (A) ⇒ A)(implicit trace: Trace): UIO[A]

    Permalink

    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
  18. final def getAndUpdateSome(pf: PartialFunction[A, A])(implicit trace: Trace): UIO[A]

    Permalink

    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
  19. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  20. def getWith[R, E, B](f: (A) ⇒ ZIO[R, E, B])(implicit trace: Trace): ZIO[R, E, B]

    Permalink

    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
  21. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  22. def initial: A

    Permalink

    The initial value of the FiberRef.

    The initial value of the FiberRef.

    Definition Classes
    ProxyFiberRef
  23. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  24. def join(oldValue: Value, newValue: Value): Value

    Permalink
    Definition Classes
    ProxyFiberRef
  25. def locally[R, E, B](newValue: A)(zio: ZIO[R, E, B])(implicit trace: Trace): ZIO[R, E, B]

    Permalink

    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
  26. final def locallyScoped(value: A)(implicit trace: Trace): ZIO[Scope, Nothing, Unit]

    Permalink

    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
  27. final def locallyScopedWith(f: (A) ⇒ A)(implicit trace: Trace): ZIO[Scope, Nothing, Unit]

    Permalink

    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
  28. final def locallyWith[R, E, B](f: (A) ⇒ A)(zio: ZIO[R, E, B])(implicit trace: Trace): ZIO[R, E, B]

    Permalink

    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
  29. def modify[B](f: (A) ⇒ (B, A))(implicit trace: Trace): UIO[B]

    Permalink

    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
  30. final def modifySome[B](default: B)(pf: PartialFunction[A, (B, A)])(implicit trace: Trace): UIO[B]

    Permalink

    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
  31. final def ne(arg0: AnyRef): Boolean

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

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

    Permalink
    Definition Classes
    AnyRef
  34. def patch(patch: Patch)(oldValue: Value): Value

    Permalink

    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
  35. final def reset(implicit trace: Trace): UIO[Unit]

    Permalink
    Definition Classes
    FiberRef
  36. def set(value: A)(implicit trace: Trace): UIO[Unit]

    Permalink

    Sets the value associated with the current fiber.

    Sets the value associated with the current fiber.

    Definition Classes
    FiberRef
  37. final def synchronized[T0](arg0: ⇒ T0): T0

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

    Permalink
    Definition Classes
    AnyRef → Any
  39. def update(f: (A) ⇒ A)(implicit trace: Trace): UIO[Unit]

    Permalink

    Atomically modifies the FiberRef with the specified function.

    Atomically modifies the FiberRef with the specified function.

    Definition Classes
    FiberRef
  40. final def updateAndGet(f: (A) ⇒ A)(implicit trace: Trace): UIO[A]

    Permalink

    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
  41. final def updateSome(pf: PartialFunction[A, A])(implicit trace: Trace): UIO[Unit]

    Permalink

    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
  42. final def updateSomeAndGet(pf: PartialFunction[A, A])(implicit trace: Trace): UIO[A]

    Permalink

    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
  43. final def wait(): Unit

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

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

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

Inherited from FiberRef[A]

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped