scala.concurrent.stm

Ref

object Ref extends RefCompanion

object Ref contains factory methods that allocate an STM-managed memory location and return a Ref instance that provides access to that location.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Ref
  2. RefCompanion
  3. AnyRef
  4. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. trait View[A] extends Source.View[A] with Sink.View[A]

    Ref.View provides access to the contents of a Ref without requiring that an implicit InTxn be available.

Value Members

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

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

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

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. def apply(initialValue: Unit): Ref[Unit]

    Definition Classes
    RefCompanion
  7. def apply(initialValue: Double): Ref[Double]

    Definition Classes
    RefCompanion
  8. def apply(initialValue: Float): Ref[Float]

    Definition Classes
    RefCompanion
  9. def apply(initialValue: Long): Ref[Long]

    Definition Classes
    RefCompanion
  10. def apply(initialValue: Int): Ref[Int]

    Definition Classes
    RefCompanion
  11. def apply(initialValue: Char): Ref[Char]

    Definition Classes
    RefCompanion
  12. def apply(initialValue: Short): Ref[Short]

    Definition Classes
    RefCompanion
  13. def apply(initialValue: Byte): Ref[Byte]

    Definition Classes
    RefCompanion
  14. def apply(initialValue: Boolean): Ref[Boolean]

    Definition Classes
    RefCompanion
  15. def apply[A](initialValue: A)(implicit om: OptManifest[A]): Ref[A]

    Returns a Ref instance that manages a newly allocated memory location, initializing it to hold initialValue.

    Returns a Ref instance that manages a newly allocated memory location, initializing it to hold initialValue. The returned Ref is not part of any transaction's read or write set.

    Example:

    val x = Ref("initial") // creates a Ref[String]
    val list1 = Ref(Nil : List[String]) // creates a Ref[List[String]]
    val list2 = Ref[List[String]](Nil)  // creates a Ref[List[String]]
    Definition Classes
    RefCompanion
  16. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  17. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate() @throws( ... )
  18. final def eq(arg0: AnyRef): Boolean

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

    Definition Classes
    AnyRef → Any
  20. def factory: RefFactory

    Attributes
    protected
    Definition Classes
    RefRefCompanion
  21. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate()
  22. def hashCode(): Int

    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate()
  23. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  24. def make[A]()(implicit om: OptManifest[A]): Ref[A]

    Returns a Ref instance that manages a newly allocated memory location holding values of type A.

    Returns a Ref instance that manages a newly allocated memory location holding values of type A. If you have an initial value v0 available, Ref(v0) should be preferred.

    Definition Classes
    RefCompanion
  25. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  26. final def notify(): Unit

    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate()
  27. final def notifyAll(): Unit

    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate()
  28. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  29. def toString(): String

    Definition Classes
    AnyRef → Any
  30. final def wait(arg0: Long, arg1: Int): Unit

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  32. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Deprecated Value Members

  1. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @Deprecated @deprecated @throws( classOf[java.lang.Throwable] )
    Deprecated

    (Since version ) see corresponding Javadoc for more information.

Inherited from RefCompanion

Inherited from AnyRef

Inherited from Any

Ungrouped