org.codehaus.gpars

groovyx.gpars.stm
[Java] Class GParsStm

java.lang.Object
  groovyx.gpars.stm.GParsStm

public abstract class GParsStm

Provides access to GPars Stm services.

Authors:
Vaclav Pech


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 TxnExecutor defaultTxnExecutor

static TxnFactoryBuilder transactionFactory

 
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(TxnExecutor block, groovy.lang.Closure code)

Performs the supplied code atomically within a transaction.

static boolean atomicWithBoolean(groovy.lang.Closure code)

static boolean atomicWithBoolean(TxnExecutor block, groovy.lang.Closure code)

static double atomicWithDouble(groovy.lang.Closure code)

static double atomicWithDouble(TxnExecutor block, groovy.lang.Closure code)

static int atomicWithInt(groovy.lang.Closure code)

static int atomicWithInt(TxnExecutor block, groovy.lang.Closure code)

static long atomicWithLong(groovy.lang.Closure code)

static long atomicWithLong(TxnExecutor block, groovy.lang.Closure code)

static void atomicWithVoid(groovy.lang.Closure code)

static void atomicWithVoid(TxnExecutor block, groovy.lang.Closure code)

static TxnExecutor createTxnExecutor()

static TxnExecutor createTxnExecutor(java.util.Map params)

static void unwrapStmControlError(org.codehaus.groovy.runtime.InvokerInvocationException e)

 
Methods inherited from class java.lang.Object
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), 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

AN_EXCEPTION_WAS_EXPECTED_TO_BE_THROWN_FROM_UNWRAP_STM_CONTROL_ERROR_FOR

static final java.lang.String AN_EXCEPTION_WAS_EXPECTED_TO_BE_THROWN_FROM_UNWRAP_STM_CONTROL_ERROR_FOR


CANNOT_CREATE_AN_ATOMIC_BLOCK_SOME_OF_THE_SPECIFIED_PARAMETERS_ARE_NOT_SUPPORTED

private static final java.lang.String CANNOT_CREATE_AN_ATOMIC_BLOCK_SOME_OF_THE_SPECIFIED_PARAMETERS_ARE_NOT_SUPPORTED


THE_CODE_FOR_AN_ATOMIC_BLOCK_MUST_NOT_BE_NULL

static final java.lang.String THE_CODE_FOR_AN_ATOMIC_BLOCK_MUST_NOT_BE_NULL


defaultTxnExecutor

private static TxnExecutor defaultTxnExecutor


transactionFactory

public static final TxnFactoryBuilder transactionFactory


 
Constructor Detail

GParsStm

GParsStm()


 
Method Detail

atomic

public static java.lang.Object atomic(groovy.lang.Closure code)
Performs the supplied code atomically within a transaction.
Parameters:
code - The code to run inside a transaction
- The type or the return value
Returns:
The result returned from the supplied code when run in a transaction


atomic

public static java.lang.Object atomic(TxnExecutor block, groovy.lang.Closure code)
Performs the supplied code atomically within a transaction.
Parameters:
code - The code to run inside a transaction
Returns:
The result returned from the supplied code when run in a transaction


atomicWithBoolean

public static boolean atomicWithBoolean(groovy.lang.Closure code)


atomicWithBoolean

public static boolean atomicWithBoolean(TxnExecutor block, groovy.lang.Closure code)


atomicWithDouble

public static double atomicWithDouble(groovy.lang.Closure code)


atomicWithDouble

public static double atomicWithDouble(TxnExecutor block, groovy.lang.Closure code)


atomicWithInt

public static int atomicWithInt(groovy.lang.Closure code)


atomicWithInt

public static int atomicWithInt(TxnExecutor block, groovy.lang.Closure code)


atomicWithLong

public static long atomicWithLong(groovy.lang.Closure code)


atomicWithLong

public static long atomicWithLong(TxnExecutor block, groovy.lang.Closure code)


atomicWithVoid

public static void atomicWithVoid(groovy.lang.Closure code)


atomicWithVoid

public static void atomicWithVoid(TxnExecutor block, groovy.lang.Closure code)


createTxnExecutor

public static TxnExecutor createTxnExecutor()


createTxnExecutor

public static TxnExecutor createTxnExecutor(java.util.Map params)


unwrapStmControlError

static void unwrapStmControlError(org.codehaus.groovy.runtime.InvokerInvocationException e)


 

Copyright © 2008–2013 Václav Pech. All Rights Reserved.