com.arjuna.ats.arjuna.coordinator
Class TxControl

java.lang.Object
  extended by com.arjuna.ats.arjuna.coordinator.TxControl

public class TxControl
extends java.lang.Object

Transaction configuration object. We have a separate object for this so that other classes can enquire of (and use) this information.

Since:
JTS 2.2.
Version:
$Id: TxControl.java 2342 2006-03-30 13:06:17Z $
Author:
Mark Little (mark@arjuna.com)

Nested Class Summary
static class TxControl.Shutdown
           
 
Field Summary
static java.lang.String DEFAULT_NODE_NAME
           
static int NODE_NAME_SIZE
           
 
Constructor Summary
TxControl()
           
 
Method Summary
static void disable()
          Stop the transaction system.
static void disable(boolean disableRecovery)
          Stop the transaction system.
static void enable()
          Start the transaction system.
static java.lang.String getActionStoreType()
           
static boolean getAsyncPrepare()
           
static int getDefaultTimeout()
          If a timeout is not associated with a transaction when it is created then this value will be used.
static boolean getMaintainHeuristics()
           
static ObjectStore getRecoveryStore()
          By default we should use the same store as the coordinator.
static ObjectStore getStore()
           
static byte[] getXANodeName()
           
static boolean isBeforeCompletionWhenRollbackOnly()
           
static boolean isEnabled()
           
static boolean isReadonlyOptimisation()
           
static void setDefaultTimeout(int timeout)
          Set the timeout to be associated with a newly created transaction if there is no other timeout to be used.
static void setXANodeName(byte[] name)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NODE_NAME_SIZE

public static final int NODE_NAME_SIZE
See Also:
Constant Field Values

DEFAULT_NODE_NAME

public static final java.lang.String DEFAULT_NODE_NAME
See Also:
Constant Field Values
Constructor Detail

TxControl

public TxControl()
Method Detail

getDefaultTimeout

public static final int getDefaultTimeout()
If a timeout is not associated with a transaction when it is created then this value will be used. A value of 0 means that the transaction will never time out.


setDefaultTimeout

public static final void setDefaultTimeout(int timeout)
Set the timeout to be associated with a newly created transaction if there is no other timeout to be used.

Parameters:
timeout -

enable

public static final void enable()
Start the transaction system. This allows new transactions to be created and for recovery to execute.


disable

public static final void disable()
Stop the transaction system. New transactions will be prevented but recovery will be allowed to continue.


disable

public static final void disable(boolean disableRecovery)
Stop the transaction system. New transactions will be prevented and recovery will cease. WARNING: make sure you know what you are doing when you call this routine!


isEnabled

public static final boolean isEnabled()

getActionStoreType

public static final java.lang.String getActionStoreType()

getRecoveryStore

public static final ObjectStore getRecoveryStore()
By default we should use the same store as the coordinator. However, there may be some ObjectStore implementations that preclude this and in which case we will default to the basic action store since performance is not an issue.

Returns:
the ObjectStore implementation which the recovery manager uses.
See Also:
ObjectStore

getStore

public static final ObjectStore getStore()
Returns:
the ObjectStore implementation which the transaction coordinator will use.
See Also:
ObjectStore

getAsyncPrepare

public static final boolean getAsyncPrepare()

getMaintainHeuristics

public static final boolean getMaintainHeuristics()

isReadonlyOptimisation

public static boolean isReadonlyOptimisation()

getXANodeName

public static final byte[] getXANodeName()

setXANodeName

public static void setXANodeName(byte[] name)

isBeforeCompletionWhenRollbackOnly

public static boolean isBeforeCompletionWhenRollbackOnly()