class AtomicStampedReference[V <: AnyRef] extends AnyRef
- Alphabetic
- By Inheritance
- AtomicStampedReference
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
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 attemptStamp(expectedReference: V, newStamp: Int): Boolean
Atomically sets the value of the stamp to the given update value if the current reference is
==
to the expected reference.Atomically sets the value of the stamp 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
- newStamp
the new value for the stamp
- 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, expectedStamp: Int, newStamp: Int): Boolean
Atomically sets the value of both the reference and stamp to the given update values if the current reference is
==
to the expected reference and the current stamp is equal to the expected stamp.Atomically sets the value of both the reference and stamp to the given update values if the current reference is
==
to the expected reference and the current stamp is equal to the expected stamp.- expectedReference
the expected value of the reference
- newReference
the new value for the reference
- expectedStamp
the expected value of the stamp
- newStamp
the new value for the stamp
- 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(stampHolder: Array[Int]): V
Returns the current values of both the reference and the stamp.
Returns the current values of both the reference and the stamp. Typical usage is
int[1] holder; ref = v.get(holder);
.- stampHolder
an array of size of at least one. On return,
stampHolder[0]
will hold the value of the stamp.- 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 getStamp(): Int
Returns the current value of the stamp.
Returns the current value of the stamp.
- returns
the current value of the stamp
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- 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, newStamp: Int): Unit
Unconditionally sets the value of both the reference and stamp.
Unconditionally sets the value of both the reference and stamp.
- newReference
the new value for the reference
- newStamp
the new value for the stamp
- 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, expectedStamp: Int, newStamp: Int): Boolean
Atomically sets the value of both the reference and stamp to the given update values if the current reference is
==
to the expected reference and the current stamp is equal to the expected stamp.Atomically sets the value of both the reference and stamp to the given update values if the current reference is
==
to the expected reference and the current stamp is equal to the expected stamp. 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
- expectedStamp
the expected value of the stamp
- newStamp
the new value for the stamp
- returns
true
if successful