|
org.codehaus.gpars | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object groovyx.gpars.stm.GParsStm
public abstract class GParsStm
Provides access to GPars Stm services.
Field Summary | |
---|---|
static java.lang.String |
AN_EXCEPTION_WAS_EXPECTED_TO_BE_THROWN_FROM_UNWRAP_STM_CONTROL_ERROR_FOR
|
private static java.lang.String |
CANNOT_CREATE_AN_ATOMIC_BLOCK_SOME_OF_THE_SPECIFIED_PARAMETERS_ARE_NOT_SUPPORTED
|
static java.lang.String |
THE_CODE_FOR_AN_ATOMIC_BLOCK_MUST_NOT_BE_NULL
|
private static AtomicBlock |
defaultAtomicBlock
The atomic block to use when no block is specified explicitly |
static TransactionFactoryBuilder |
transactionFactory
Gives access to multiverse TransactionFactoryBuilder to allow customized creation of atomic blocks |
Constructor Summary | |
GParsStm()
|
Method Summary | |
---|---|
static java.lang.Object
|
atomic(groovy.lang.Closure code)
Performs the supplied code atomically within a transaction. |
static java.lang.Object
|
atomic(AtomicBlock block, groovy.lang.Closure code)
Performs the supplied code atomically within a transaction using the supplied atomic block. |
static boolean
|
atomicWithBoolean(groovy.lang.Closure code)
Performs the supplied code atomically within a transaction. |
static boolean
|
atomicWithBoolean(AtomicBlock block, groovy.lang.Closure code)
Performs the supplied code atomically within a transaction using the supplied atomic block. |
static double
|
atomicWithDouble(groovy.lang.Closure code)
Performs the supplied code atomically within a transaction. |
static double
|
atomicWithDouble(AtomicBlock block, groovy.lang.Closure code)
Performs the supplied code atomically within a transaction using the supplied atomic block. |
static int
|
atomicWithInt(groovy.lang.Closure code)
Performs the supplied code atomically within a transaction. |
static int
|
atomicWithInt(AtomicBlock block, groovy.lang.Closure code)
Performs the supplied code atomically within a transaction using the supplied atomic block. |
static long
|
atomicWithLong(groovy.lang.Closure code)
Performs the supplied code atomically within a transaction. |
static long
|
atomicWithLong(AtomicBlock block, groovy.lang.Closure code)
Performs the supplied code atomically within a transaction using the supplied atomic block. |
static void
|
atomicWithVoid(groovy.lang.Closure code)
Performs the supplied code atomically within a transaction. |
static void
|
atomicWithVoid(AtomicBlock block, groovy.lang.Closure code)
Performs the supplied code atomically within a transaction using the supplied atomic block. |
static AtomicBlock
|
createAtomicBlock()
A factory method to create custom atomic blocks. |
static AtomicBlock
|
createAtomicBlock(java.util.Map params)
A factory method to create custom atomic blocks allowing the caller to set desired transactional characteristics. |
static void
|
unwrapStmControlError(org.codehaus.groovy.runtime.InvokerInvocationException e)
Unwraps the multiverse control exceptions from Groovy exceptions |
Methods inherited from class java.lang.Object | |
---|---|
java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#wait(long, int), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Field Detail |
---|
static final java.lang.String AN_EXCEPTION_WAS_EXPECTED_TO_BE_THROWN_FROM_UNWRAP_STM_CONTROL_ERROR_FOR
private static final java.lang.String CANNOT_CREATE_AN_ATOMIC_BLOCK_SOME_OF_THE_SPECIFIED_PARAMETERS_ARE_NOT_SUPPORTED
static final java.lang.String THE_CODE_FOR_AN_ATOMIC_BLOCK_MUST_NOT_BE_NULL
private static final AtomicBlock defaultAtomicBlock
public static final TransactionFactoryBuilder transactionFactory
Constructor Detail |
---|
GParsStm()
Method Detail |
---|
public static java.lang.Object atomic(groovy.lang.Closure code)
code
- The code to run inside a transaction
- The type or the return value
public static java.lang.Object atomic(AtomicBlock block, groovy.lang.Closure code)
code
- The code to run inside a transaction
- The type or the return value
public static boolean atomicWithBoolean(groovy.lang.Closure code)
code
- The code to run inside a transaction
public static boolean atomicWithBoolean(AtomicBlock block, groovy.lang.Closure code)
code
- The code to run inside a transaction
public static double atomicWithDouble(groovy.lang.Closure code)
code
- The code to run inside a transaction
public static double atomicWithDouble(AtomicBlock block, groovy.lang.Closure code)
code
- The code to run inside a transaction
public static int atomicWithInt(groovy.lang.Closure code)
code
- The code to run inside a transaction
public static int atomicWithInt(AtomicBlock block, groovy.lang.Closure code)
code
- The code to run inside a transaction
public static long atomicWithLong(groovy.lang.Closure code)
code
- The code to run inside a transaction
public static long atomicWithLong(AtomicBlock block, groovy.lang.Closure code)
code
- The code to run inside a transaction
public static void atomicWithVoid(groovy.lang.Closure code)
code
- The code to run inside a transaction
public static void atomicWithVoid(AtomicBlock block, groovy.lang.Closure code)
code
- The code to run inside a transaction
public static AtomicBlock createAtomicBlock()
public static AtomicBlock createAtomicBlock(java.util.Map params)
params
- A map holding all values that should be specified. See the Multiverse documentation for possible values
static void unwrapStmControlError(org.codehaus.groovy.runtime.InvokerInvocationException e)
e
- The exception to unwrap from
Copyright © 2008–2012 Václav Pech. All Rights Reserved.