object ZRef extends Serializable
- Alphabetic
- By Inheritance
- ZRef
- Serializable
- Serializable
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
-
sealed abstract
class
Synchronized[-RA, -RB, +EA, +EB, -A, +B] extends ZRef[RA, RB, EA, EB, A, B]
A
ZRef.Synchronized[RA, RB, EA, EB, A, B]
is a polymorphic, purely functional description of a mutable reference.A
ZRef.Synchronized[RA, RB, EA, EB, A, B]
is a polymorphic, purely functional description of a mutable reference. The fundamental operations of aZRef.Synchronized
areset
andget
.set
takes a value of typeA
and sets the reference to a new value, requiring an environment of typeRA
and potentially failing with an error of typeEA
.get
gets the current value of the reference and returns a value of typeB
, requiring an environment of typeRB
and potentially failing with an error of typeEB
.When the error and value types of the
ZRef.Synchronized
are unified, that is, it is aZRef.Synchronized[R, R, E, E, A, A]
, theZRef.Synchronized
also supports atomicmodify
andupdate
operations.Unlike an ordinary
ZRef
, aZRef.Synchronized
allows performing effects within update operations, at some cost to performance. Writes will semantically block other writers, while multiple readers can read simultaneously.ZRef.Synchronized
also supports composing multipleZRef.Synchronized
values together to form a singleZRef.Synchronized
value that can be atomically updated using thezip
operator. In this case reads and writes will semantically block other readers and writers. - implicit final class UnifiedSyntax[-R, +E, A] extends AnyVal
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( ... ) @native()
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
make[A](a: ⇒ A)(implicit trace: ZTraceElement): UIO[Ref[A]]
Creates a new
ZRef
with the specified value. -
def
makeManaged[A](a: ⇒ A)(implicit trace: ZTraceElement): Managed[Nothing, Ref[A]]
Creates a new managed
ZRef
with the specified value -
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
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
- object Synchronized extends Serializable