object STM
Java-friendly API for ScalaSTM. These methods can also be statically imported.
- Alphabetic
- By Inheritance
- STM
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
- abstract class Transformer[A <: AnyRef] extends AnyRef
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
- def afterCommit(task: Runnable): Unit
Add a task to run after the current transaction has committed.
Add a task to run after the current transaction has committed.
- task
the
Runnabletask to run after transaction commit
- Exceptions thrown
IllegalStateExceptionif called from outside a transaction
- def afterCompletion(task: Runnable): Unit
Add a task to run after the current transaction has either rolled back or committed.
Add a task to run after the current transaction has either rolled back or committed.
- task
the
Runnabletask to run after transaction completion
- Exceptions thrown
IllegalStateExceptionif called from outside a transaction
- def afterRollback(task: Runnable): Unit
Add a task to run after the current transaction has rolled back.
Add a task to run after the current transaction has rolled back.
- task
the
Runnabletask to run after transaction rollback
- Exceptions thrown
IllegalStateExceptionif called from outside a transaction
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def atomic[A <: AnyRef](callable: Callable[A]): A
Atomic block that takes a
Callable.Atomic block that takes a
Callable.- callable
the
Callableto run within a transaction- returns
the value returned by the
Callable
- def atomic(runnable: Runnable): Unit
Atomic block that takes a
Runnable.Atomic block that takes a
Runnable.- runnable
the
Runnableto run within a transaction
- def clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- def getAndTransform[A <: AnyRef](ref: View[A], f: Transformer[A]): A
Transform the value stored by
refby applying the functionfand return the old value.Transform the value stored by
refby applying the functionfand return the old value.- ref
the
Ref.Viewto be transformed- f
the function to be applied
- returns
the old value of
ref
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def increment(ref: View[java.lang.Long], delta: Long): Unit
Increment the
java.lang.Longvalue of aRef.View.Increment the
java.lang.Longvalue of aRef.View.- ref
the
Ref.View<Long>to be incremented- delta
the amount to increment
- def increment(ref: View[Integer], delta: Int): Unit
Increment the
java.lang.Integervalue of aRef.View.Increment the
java.lang.Integervalue of aRef.View.- ref
the
Ref.View<Integer>to be incremented- delta
the amount to increment
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def newArrayAsList[A <: AnyRef](length: Int): java.util.List[A]
Create an empty TArray.
Create an empty TArray. Return a
java.util.Listview of this Array.- length
the length of the
TArray.Viewto be created- returns
a new, empty
TArray.Viewwrapped as ajava.util.List.
- def newMap[A, B](): Map[A, B]
Create an empty TMap.
Create an empty TMap. Return a
java.util.Mapview of this TMap.- returns
a new, empty
TMap.Viewwrapped as ajava.util.Map.
- def newRef[A](initialValue: A): View[A]
Create a Ref with an initial value.
Create a Ref with an initial value. Return a
Ref.View, which does not require implicit transactions.- initialValue
the initial value for the newly created
Ref.View- returns
a new
Ref.View
- def newSet[A](): Set[A]
Create an empty TSet.
Create an empty TSet. Return a
java.util.Setview of this TSet.- returns
a new, empty
TSet.Viewwrapped as ajava.util.Set.
- def newTArray[A <: AnyRef](length: Int): View[A]
Create a TArray containing
lengthelements.Create a TArray containing
lengthelements. Return aTArray.View, which does not require implicit transactions. See newList for included java conversion.- length
the length of the
TArray.Viewto be created- returns
a new
TArray.Viewcontaininglengthelements (initially null)
- def newTMap[A, B](): View[A, B]
Create an empty TMap.
Create an empty TMap. Return a
TMap.View, which does not require implicit transactions. See newMap for included java conversion.- returns
a new, empty
TMap.View
- def newTSet[A](): View[A]
Create an empty TSet.
Create an empty TSet. Return a
TSet.View, which does not require implicit transactions. See newSet for included java conversion.- returns
a new, empty
TSet.View
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def retry(): Unit
Causes the enclosing transaction to back up and wait until one of the
Refs touched by this transaction has changed.Causes the enclosing transaction to back up and wait until one of the
Refs touched by this transaction has changed.- Exceptions thrown
IllegalStateExceptionif not in a transaction
- def retryFor(timeoutMillis: Long): Unit
Like
retry, but limits the total amount of blocking.Like
retry, but limits the total amount of blocking. This method only returns normally when the timeout has expired. - final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- def transform[A <: AnyRef](ref: View[A], f: Transformer[A]): Unit
Transform the value stored by
refby applying the functionf.Transform the value stored by
refby applying the functionf.- ref
the
Ref.Viewto be transformed- f
the function to be applied
- def transformAndGet[A <: AnyRef](ref: View[A], f: Transformer[A]): A
Transform the value stored by
refby applying the functionfand return the new value.Transform the value stored by
refby applying the functionfand return the new value.- ref
the
Ref.Viewto be transformed- f
the function to be applied
- returns
the new value of
ref
- 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()