class AtomicMarkableReference[V <: AnyRef] extends AnyRef
- Alphabetic
- By Inheritance
- AtomicMarkableReference
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
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 attemptMark(expectedReference: V, newMark: Boolean): Boolean
Atomically sets the value of the mark to the given update value if the current reference is
==
to the expected reference.Atomically sets the value of the mark to the given update value if the current reference is
==
to the expected reference. Any given invocation of this operation may fail (returnfalse
) spuriously, but repeated invocation when the current value holds the expected value and no other thread is also attempting to set the value will eventually succeed.- expectedReference
the expected value of the reference
- newMark
the new value for the mark
- returns
true
if successful
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def compareAndSet(expectedReference: V, newReference: V, expectedMark: Boolean, newMark: Boolean): Boolean
Atomically sets the value of both the reference and mark to the given update values if the current reference is
==
to the expected reference and the current mark is equal to the expected mark.Atomically sets the value of both the reference and mark to the given update values if the current reference is
==
to the expected reference and the current mark is equal to the expected mark.- expectedReference
the expected value of the reference
- newReference
the new value for the reference
- expectedMark
the expected value of the mark
- newMark
the new value for the mark
- returns
true
if successful
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- def get(markHolder: Array[Boolean]): V
Returns the current values of both the reference and the mark.
Returns the current values of both the reference and the mark. Typical usage is
boolean[1] holder; ref = v.get(holder);
.- markHolder
an array of size of at least one. On return,
markHolder[0]
will hold the value of the mark.- returns
the current value of the reference
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def getReference(): V
Returns the current value of the reference.
Returns the current value of the reference.
- returns
the current value of the reference
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def isMarked(): Boolean
Returns the current value of the mark.
Returns the current value of the mark.
- returns
the current value of the mark
- 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()
- def set(newReference: V, newMark: Boolean): Unit
Unconditionally sets the value of both the reference and mark.
Unconditionally sets the value of both the reference and mark.
- newReference
the new value for the reference
- newMark
the new value for the mark
- 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(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- def weakCompareAndSet(expectedReference: V, newReference: V, expectedMark: Boolean, newMark: Boolean): Boolean
Atomically sets the value of both the reference and mark to the given update values if the current reference is
==
to the expected reference and the current mark is equal to the expected mark.Atomically sets the value of both the reference and mark to the given update values if the current reference is
==
to the expected reference and the current mark is equal to the expected mark. This operation may fail spuriously and does not provide ordering guarantees, so is only rarely an appropriate alternative tocompareAndSet
.- expectedReference
the expected value of the reference
- newReference
the new value for the reference
- expectedMark
the expected value of the mark
- newMark
the new value for the mark
- returns
true
if successful