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
Runnable
task to run after transaction commit
- Exceptions thrown
IllegalStateException
if 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
Runnable
task to run after transaction completion
- Exceptions thrown
IllegalStateException
if 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
Runnable
task to run after transaction rollback
- Exceptions thrown
IllegalStateException
if 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
Callable
to 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
Runnable
to run within a transaction
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): 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
ref
by applying the functionf
and return the old value.Transform the value stored by
ref
by applying the functionf
and return the old value.- ref
the
Ref.View
to be transformed- f
the function to be applied
- returns
the old value of
ref
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
-
def
increment(ref: View[java.lang.Long], delta: Long): Unit
Increment the
java.lang.Long
value of aRef.View
.Increment the
java.lang.Long
value 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.Integer
value of aRef.View
.Increment the
java.lang.Integer
value 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.List
view of this Array.- length
the length of the
TArray.View
to be created- returns
a new, empty
TArray.View
wrapped as ajava.util.List
.
-
def
newMap[A, B](): Map[A, B]
Create an empty TMap.
Create an empty TMap. Return a
java.util.Map
view of this TMap.- returns
a new, empty
TMap.View
wrapped 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.Set
view of this TSet.- returns
a new, empty
TSet.View
wrapped as ajava.util.Set
.
-
def
newTArray[A <: AnyRef](length: Int): View[A]
Create a TArray containing
length
elements.Create a TArray containing
length
elements. Return aTArray.View
, which does not require implicit transactions. See newList for included java conversion.- length
the length of the
TArray.View
to be created- returns
a new
TArray.View
containinglength
elements (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
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
-
def
retry(): Unit
Causes the enclosing transaction to back up and wait until one of the
Ref
s touched by this transaction has changed.Causes the enclosing transaction to back up and wait until one of the
Ref
s touched by this transaction has changed.- Exceptions thrown
IllegalStateException
if 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
ref
by applying the functionf
.Transform the value stored by
ref
by applying the functionf
.- ref
the
Ref.View
to be transformed- f
the function to be applied
-
def
transformAndGet[A <: AnyRef](ref: View[A], f: Transformer[A]): A
Transform the value stored by
ref
by applying the functionf
and return the new value.Transform the value stored by
ref
by applying the functionf
and return the new value.- ref
the
Ref.View
to be transformed- f
the function to be applied
- returns
the new value of
ref
-
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( ... )