com.arjuna.ats.arjuna.coordinator
Class TxControl

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

public class TxControl
extends 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 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 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 String 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(String 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 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()

getAsyncPrepare

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

getMaintainHeuristics

public static final boolean getMaintainHeuristics()

isReadonlyOptimisation

public static boolean isReadonlyOptimisation()

getXANodeName

public static final String getXANodeName()

setXANodeName

public static void setXANodeName(String name)

isBeforeCompletionWhenRollbackOnly

public static boolean isBeforeCompletionWhenRollbackOnly()


Copyright © 2012. All Rights Reserved.