Class TxControl
- java.lang.Object
-
- com.arjuna.ats.arjuna.coordinator.TxControl
-
public class TxControl extends java.lang.ObjectTransaction 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
Nested Classes Modifier and Type Class Description static classTxControl.Shutdown
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringDEFAULT_NODE_NAMEstatic intNODE_NAME_SIZE
-
Constructor Summary
Constructors Constructor Description TxControl()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voiddisable()Stop the transaction system.static voiddisable(boolean disableRecovery)Stop the transaction system.static voidenable()Start the transaction system.static booleangetAsyncPrepare()static intgetDefaultTimeout()If a timeout is not associated with a transaction when it is created then this value will be used.static booleangetMaintainHeuristics()static java.lang.StringgetXANodeName()static byte[]getXaNodeNameBytes()static booleanisBeforeCompletionWhenRollbackOnly()static booleanisEnabled()static booleanisReadonlyOptimisation()static voidsetDefaultTimeout(int timeout)Set the timeout to be associated with a newly created transaction if there is no other timeout to be used.static voidsetXANodeName(java.lang.String name)
-
-
-
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
-
-
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()
-
getAsyncPrepare
public static final boolean getAsyncPrepare()
- Returns:
- the
ObjectStoreimplementation which the transaction coordinator will use. - See Also:
ObjectStore
-
getMaintainHeuristics
public static final boolean getMaintainHeuristics()
-
isReadonlyOptimisation
public static boolean isReadonlyOptimisation()
-
getXANodeName
public static final java.lang.String getXANodeName()
-
getXaNodeNameBytes
public static final byte[] getXaNodeNameBytes()
-
setXANodeName
public static void setXANodeName(java.lang.String name)
-
isBeforeCompletionWhenRollbackOnly
public static boolean isBeforeCompletionWhenRollbackOnly()
-
-