com.arjuna.ats.arjuna.common
Class CoordinatorEnvironmentBean

java.lang.Object
  extended by com.arjuna.ats.arjuna.common.CoordinatorEnvironmentBean
All Implemented Interfaces:
CoordinatorEnvironmentBeanMBean

public class CoordinatorEnvironmentBean
extends Object
implements CoordinatorEnvironmentBeanMBean

A JavaBean containing configuration properties for the core transaction coordinator.

Author:
Jonathan Halliday (jonathan.halliday@redhat.com)

Constructor Summary
CoordinatorEnvironmentBean()
           
 
Method Summary
 String getActionStore()
          Returns the symbolic name for the action store type.
 CheckedActionFactory getCheckedActionFactory()
          Returns an instance of a class implementing CheckedActionFactory.
 String getCheckedActionFactoryClassName()
          Returns the class name of an implementation of CheckedActionFactory Default: "com.arjuna.ats.internal.arjuna.coordinator.CheckedActionFactoryImple" Equivalent deprecated property: com.arjuna.ats.coordinator.checkedActionFactory
 String getCommunicationStore()
          Returns the symbolic name for the communication store type.
 int getDefaultTimeout()
          Returns the default interval after which a transaction may be considered for timeout, in seconds.
 long getTxReaperCancelFailWaitPeriod()
          Returns the number of millisecs delay afer a worker thread is interrupted, before the reaper writes the it off as a zombie and starts a new thread.
 long getTxReaperCancelWaitPeriod()
          Returns the number of millisecs delay afer a cancel is scheduled, before the reaper tries to interrupt the worker thread executing the cancel.
 String getTxReaperMode()
          Returns the operating mode of the transaction timeout processing system.
 long getTxReaperTimeout()
          Returns the timeout (wakeup) interval of the reaper's PERIODIC mode, in milliseconds.
 int getTxReaperZombieMax()
          Returns the threshold for count of non-exited zombies at which the system starts logging error messages.
 boolean isAlternativeRecordOrdering()
          Whether to use the alternative abstract record ordering.
 boolean isAsyncCommit()
          Returns true if anynchronous commit behaviour is enabled.
 boolean isAsyncPrepare()
          Returns true if asynchronous prepare behaviour is enabled.
 boolean isAsyncRollback()
          Returns true if asynchronous rollback behaviour is enabled.
 boolean isBeforeCompletionWhenRollbackOnly()
          Returns if beforeCompletion should be called on Synchronizations when completing transactions that are marked rollback only.
 boolean isClassicPrepare()
          Returns true if the old sytle of prepare handling should be used for PersistenceRecord.
 boolean isCommitOnePhase()
          Returns true if one phase commit optimization is to be used.
 boolean isEnableStatistics()
          Returns true if transaction statistics should be recorded.
 boolean isFinalizeBasicActions()
          Sets whether or not to use finalizers for BasicActions (i.e.
 boolean isMaintainHeuristics()
          Returns true if heuristic outcomes should be recorded.
 boolean isReadonlyOptimisation()
          Returns true if handling of read only resources should be optimized.
 boolean isSharedTransactionLog()
          Returns if the transaction log sould be run in shared mode or not.
 boolean isStartDisabled()
          Returns if the transaction manager should be created in a disabled state or not.
 boolean isTransactionStatusManagerEnable()
          Returns if the transaction status manager (TSM) service, needed for out of process recovery, should be provided or not.
 boolean isWriteOptimisation()
          Returns true if write optimisation protocol should be used for PersistenceRecord.
 void setActionStore(String actionStore)
          Sets the symbolic name of the action store.
 void setAlternativeRecordOrdering(boolean alternativeRecordOrdering)
          Set whether or not to use the alternative abstract record ordering.
 void setAsyncCommit(boolean asyncCommit)
          Sets if asynchronous commit behaviour should be enabled or not.
 void setAsyncPrepare(boolean asyncPrepare)
          Sets if asynchronous prepare behaviour should be enabled or not.
 void setAsyncRollback(boolean asyncRollback)
          Sets if asynchronous rollback behaviour should be enabled or not.
 void setBeforeCompletionWhenRollbackOnly(boolean beforeCompletionWhenRollbackOnly)
          Sets if beforeCompletion should be called on transactions that are set rollback only.
 void setCheckedActionFactory(CheckedActionFactory instance)
          Sets the instance of CheckedActionFactory.
 void setCheckedActionFactoryClassName(String checkedActionFactoryClassName)
          Sets the class name of the CheckedActionFactory implementation.
 void setClassicPrepare(boolean classicPrepare)
          Sets if old sytle prepare handling should be used for PersistenceRecord.
 void setCommitOnePhase(boolean commitOnePhase)
          Sets if one phase commit behaviour is enabled or not.
 void setCommunicationStore(String communicationStore)
          Sets the symbolic name of the communication store.
 void setDefaultTimeout(int defaultTimeout)
          Sets the default lifetime after which a transaction may be considered for timeout, in seconds.
 void setEnableStatistics(boolean enableStatistics)
          Sets if transaction statistics should be recorded or not.
 void setFinalizeBasicActions(boolean finalizeBasicActions)
          Sets whether or not to use finalizers for BasicActions (i.e.
 void setMaintainHeuristics(boolean maintainHeuristics)
          Sets if heuristics should be recorded or not.
 void setReadonlyOptimisation(boolean readonlyOptimisation)
          Sets if handling of read only resources should be optimized.
 void setSharedTransactionLog(boolean sharedTransactionLog)
          Sets if the transaction log should be run in shared mode or not.
 void setStartDisabled(boolean startDisabled)
          Sets if the transaction manager should be created in a disabled state or not.
 void setTransactionStatusManagerEnable(boolean transactionStatusManagerEnable)
          Sets if the transaction status manager service should be provided or not.
 void setTxReaperCancelFailWaitPeriod(long txReaperCancelFailWaitPeriod)
          Sets the delay to allow an interrupted cancel to be cleaned up.
 void setTxReaperCancelWaitPeriod(long txReaperCancelWaitPeriod)
          Sets the delay to allow a cancel to be processed before interrupting it.
 void setTxReaperMode(String txReaperMode)
          Sets the operating mode of the transaction timeout processing system.
 void setTxReaperTimeout(long txReaperTimeout)
          Sets the timeout interval of the transaction reaper.
 void setTxReaperZombieMax(int txReaperZombieMax)
          Sets the threshold number of zombie threads at which errors will start to be reported.
 void setWriteOptimisation(boolean writeOptimisation)
          Sets if write optimization protocol should be used for PersistenceRecord.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CoordinatorEnvironmentBean

public CoordinatorEnvironmentBean()
Method Detail

getActionStore

public String getActionStore()
Returns the symbolic name for the action store type. Default: "HashedActionStore" Equivalent deprecated property: com.arjuna.ats.arjuna.coordinator.actionStore

Specified by:
getActionStore in interface CoordinatorEnvironmentBeanMBean
Returns:
the action store name.

setActionStore

public void setActionStore(String actionStore)
Sets the symbolic name of the action store.

Parameters:
actionStore - the action store name.

isAsyncCommit

public boolean isAsyncCommit()
Returns true if anynchronous commit behaviour is enabled. Default: false Equivalent deprecated property: com.arjuna.ats.arjuna.coordinator.asyncCommit

Specified by:
isAsyncCommit in interface CoordinatorEnvironmentBeanMBean
Returns:
true if asynchronous commit is enabled, value otherwise.

setAsyncCommit

public void setAsyncCommit(boolean asyncCommit)
Sets if asynchronous commit behaviour should be enabled or not. Note: heuristics cannot be reported programatically if asynchronous commit is used.

Parameters:
asyncCommit - true to enable asynchronous commit, false to disable.

isAsyncPrepare

public boolean isAsyncPrepare()
Returns true if asynchronous prepare behaviour is enabled. Default: false Equivalent deprecated property: com.arjuna.ats.arjuna.coordinator.asyncPrepare

Specified by:
isAsyncPrepare in interface CoordinatorEnvironmentBeanMBean
Returns:
true if asynchronous prepare is enabled, false otherwise.

setAsyncPrepare

public void setAsyncPrepare(boolean asyncPrepare)
Sets if asynchronous prepare behaviour should be enabled or not.

Parameters:
asyncPrepare - true to enable asynchronous prepare, false to disable.

isAsyncRollback

public boolean isAsyncRollback()
Returns true if asynchronous rollback behaviour is enabled. Default: false Equivalent deprecated property: com.arjuna.ats.arjuna.coordinator.asyncRollback

Specified by:
isAsyncRollback in interface CoordinatorEnvironmentBeanMBean
Returns:
true if asynchronous rollback is enabled, false otherwise.

setAsyncRollback

public void setAsyncRollback(boolean asyncRollback)
Sets if asynchronous rollback behaviour should be enabled or not.

Parameters:
asyncRollback - true to enable asynchronous rollback, false to disable.

isCommitOnePhase

public boolean isCommitOnePhase()
Returns true if one phase commit optimization is to be used. Default: true Equivalent deprecated property: com.arjuna.ats.arjuna.coordinator.commitOnePhase

Specified by:
isCommitOnePhase in interface CoordinatorEnvironmentBeanMBean
Returns:
true if one phase commit is enabled, false otherwise.

setCommitOnePhase

public void setCommitOnePhase(boolean commitOnePhase)
Sets if one phase commit behaviour is enabled or not.

Parameters:
commitOnePhase - true to enable, false to disable.

isMaintainHeuristics

public boolean isMaintainHeuristics()
Returns true if heuristic outcomes should be recorded. Default: true Equivalent deprecated property: com.arjuna.ats.arjuna.coordinator.maintainHeuristics

Specified by:
isMaintainHeuristics in interface CoordinatorEnvironmentBeanMBean
Returns:
true if heuristics should be recorded, false otherwise.

setMaintainHeuristics

public void setMaintainHeuristics(boolean maintainHeuristics)
Sets if heuristics should be recorded or not.

Parameters:
maintainHeuristics - true to enable recording of heuristics, false to disable.

isWriteOptimisation

public boolean isWriteOptimisation()
Returns true if write optimisation protocol should be used for PersistenceRecord. Default: false Equivalent deprecated property: com.arjuna.ats.arjuna.coordinator.transactionLog.writeOptimisation

Specified by:
isWriteOptimisation in interface CoordinatorEnvironmentBeanMBean
Returns:
true if write optimisation is enabled, false otherwise.

setWriteOptimisation

public void setWriteOptimisation(boolean writeOptimisation)
Sets if write optimization protocol should be used for PersistenceRecord.

Parameters:
writeOptimisation - true to enable write optimization, false to disable.

isReadonlyOptimisation

public boolean isReadonlyOptimisation()
Returns true if handling of read only resources should be optimized. Default: true Equivalent deprecated property: com.arjuna.ats.arjuna.coordinator.readonlyOptimisation

Specified by:
isReadonlyOptimisation in interface CoordinatorEnvironmentBeanMBean
Returns:
true if read only optimization is enabled, false otherwise.

setReadonlyOptimisation

public void setReadonlyOptimisation(boolean readonlyOptimisation)
Sets if handling of read only resources should be optimized.

Parameters:
readonlyOptimisation - true to enable read only optimization, false to disable.

isClassicPrepare

public boolean isClassicPrepare()
Returns true if the old sytle of prepare handling should be used for PersistenceRecord. Default: false Equivalent deprecated property: com.arjuna.ats.arjuna.coordinator.classicPrepare

Specified by:
isClassicPrepare in interface CoordinatorEnvironmentBeanMBean
Returns:
true is classic prepare handling is enabled, false otherwise.

setClassicPrepare

public void setClassicPrepare(boolean classicPrepare)
Sets if old sytle prepare handling should be used for PersistenceRecord.

Parameters:
classicPrepare - true to enable classic prepare handling, false to disable.

isEnableStatistics

public boolean isEnableStatistics()
Returns true if transaction statistics should be recorded. Note: Enabling statistics may have a slight performance impact due to locking on the counter variables. Default: false Equivalent deprecated property: com.arjuna.ats.arjuna.coordinator.enableStatistics Effect: immediate.

Specified by:
isEnableStatistics in interface CoordinatorEnvironmentBeanMBean
Returns:
true if recording of transaction statistics is enabled, false otherwise.

setEnableStatistics

public void setEnableStatistics(boolean enableStatistics)
Sets if transaction statistics should be recorded or not.

Specified by:
setEnableStatistics in interface CoordinatorEnvironmentBeanMBean
Parameters:
enableStatistics - true to enable statistics gathering, false to disable.

isSharedTransactionLog

public boolean isSharedTransactionLog()
Returns if the transaction log sould be run in shared mode or not. Default: false Equivalent deprecated property: com.arjuna.ats.arjuna.coordinator.sharedTransactionLog

Specified by:
isSharedTransactionLog in interface CoordinatorEnvironmentBeanMBean
Returns:
true if transaction log sharing is enabled, false otherwise.

setSharedTransactionLog

public void setSharedTransactionLog(boolean sharedTransactionLog)
Sets if the transaction log should be run in shared mode or not.

Parameters:
sharedTransactionLog - true to enable transaction log sharing, false to disable.

isStartDisabled

public boolean isStartDisabled()
Returns if the transaction manager should be created in a disabled state or not. Default: false (i.e. transaction manager is enabled on creation) Equivalent deprecated property: com.arjuna.ats.arjuna.coordinator.startDisabled

Specified by:
isStartDisabled in interface CoordinatorEnvironmentBeanMBean
Returns:
true if the transaction manager will start in a disabled state, false otherwise.

setStartDisabled

public void setStartDisabled(boolean startDisabled)
Sets if the transaction manager should be created in a disabled state or not.

Parameters:
startDisabled - true to start in a diabled state, false to start enabled.

getTxReaperMode

public String getTxReaperMode()
Returns the operating mode of the transaction timeout processing system. Default: "DYNAMIC" Equivalent deprecated property: com.arjuna.ats.arjuna.coordinator.txReaperMode

Specified by:
getTxReaperMode in interface CoordinatorEnvironmentBeanMBean
Returns:
the operating mode of the transaction reaper.

setTxReaperMode

public void setTxReaperMode(String txReaperMode)
Sets the operating mode of the transaction timeout processing system.

Parameters:
txReaperMode - the name of the required operating mode.

getTxReaperTimeout

public long getTxReaperTimeout()
Returns the timeout (wakeup) interval of the reaper's PERIODIC mode, in milliseconds. Default: 120000ms Equivalent deprecated property: com.arjuna.ats.arjuna.coordinator.txReaperTimeout

Specified by:
getTxReaperTimeout in interface CoordinatorEnvironmentBeanMBean
Returns:
the sleep interval of the transaction reaper, in milliseconds.

setTxReaperTimeout

public void setTxReaperTimeout(long txReaperTimeout)
Sets the timeout interval of the transaction reaper.

Parameters:
txReaperTimeout - the reaper sleep interval, in milliseconds.

getTxReaperCancelWaitPeriod

public long getTxReaperCancelWaitPeriod()
Returns the number of millisecs delay afer a cancel is scheduled, before the reaper tries to interrupt the worker thread executing the cancel. Default: 500ms Equivalent deprecated property: com.arjuna.ats.arjuna.coordinator.txReaperCancelWaitPeriod

Specified by:
getTxReaperCancelWaitPeriod in interface CoordinatorEnvironmentBeanMBean
Returns:
the reaper cancel wait period, in milliseconds.

setTxReaperCancelWaitPeriod

public void setTxReaperCancelWaitPeriod(long txReaperCancelWaitPeriod)
Sets the delay to allow a cancel to be processed before interrupting it.

Parameters:
txReaperCancelWaitPeriod - in milliseconds.

getTxReaperCancelFailWaitPeriod

public long getTxReaperCancelFailWaitPeriod()
Returns the number of millisecs delay afer a worker thread is interrupted, before the reaper writes the it off as a zombie and starts a new thread. Default: 500ms Equivalent deprecated property: com.arjuna.ats.arjuna.coordinator.txReaperCancelFailWaitPeriod

Specified by:
getTxReaperCancelFailWaitPeriod in interface CoordinatorEnvironmentBeanMBean
Returns:
the reaper cancel wait fail period, in milliseconds.

setTxReaperCancelFailWaitPeriod

public void setTxReaperCancelFailWaitPeriod(long txReaperCancelFailWaitPeriod)
Sets the delay to allow an interrupted cancel to be cleaned up.

Parameters:
txReaperCancelFailWaitPeriod - in milliseconds.

getTxReaperZombieMax

public int getTxReaperZombieMax()
Returns the threshold for count of non-exited zombies at which the system starts logging error messages. Default: 8 Equivalent deprecated property: com.arjuna.ats.arjuna.coordinator.txReaperZombieMax

Specified by:
getTxReaperZombieMax in interface CoordinatorEnvironmentBeanMBean
Returns:
the number of zombie threads at which errors will start being reported.

setTxReaperZombieMax

public void setTxReaperZombieMax(int txReaperZombieMax)
Sets the threshold number of zombie threads at which errors will start to be reported.

Parameters:
txReaperZombieMax - the number of threads.

getDefaultTimeout

public int getDefaultTimeout()
Returns the default interval after which a transaction may be considered for timeout, in seconds. Note: depending on the reaper mode and workload, transactions may not be timed out immediately. Default: 60 Equivalent deprecated property: com.arjuna.ats.arjuna.coordinator.defaultTimeout

Specified by:
getDefaultTimeout in interface CoordinatorEnvironmentBeanMBean
Returns:
the default transaction lifetime, in seconds.

setDefaultTimeout

public void setDefaultTimeout(int defaultTimeout)
Sets the default lifetime after which a transaction may be considered for timeout, in seconds.

Parameters:
defaultTimeout - the default transaction lifetime, in seconds.

isTransactionStatusManagerEnable

public boolean isTransactionStatusManagerEnable()
Returns if the transaction status manager (TSM) service, needed for out of process recovery, should be provided or not. Default: true Equivalent deprecated property: com.arjuna.ats.arjuna.coordinator.transactionStatusManagerEnable

Specified by:
isTransactionStatusManagerEnable in interface CoordinatorEnvironmentBeanMBean
Returns:
true is the transaction status manager is enabled, false otherwise.

setTransactionStatusManagerEnable

public void setTransactionStatusManagerEnable(boolean transactionStatusManagerEnable)
Sets if the transaction status manager service should be provided or not.

Parameters:
transactionStatusManagerEnable - true to enable the TSM, false to disable.

isBeforeCompletionWhenRollbackOnly

public boolean isBeforeCompletionWhenRollbackOnly()
Returns if beforeCompletion should be called on Synchronizations when completing transactions that are marked rollback only. Default: false Equivalent deprecated property: com.arjuna.ats.coordinator.beforeCompletionWhenRollbackOnly

Specified by:
isBeforeCompletionWhenRollbackOnly in interface CoordinatorEnvironmentBeanMBean
Returns:
true if beforeCompletion will be called in rollback only cases, false otherwise.

setBeforeCompletionWhenRollbackOnly

public void setBeforeCompletionWhenRollbackOnly(boolean beforeCompletionWhenRollbackOnly)
Sets if beforeCompletion should be called on transactions that are set rollback only.

Parameters:
beforeCompletionWhenRollbackOnly - true to call beforeCompletions on rollback only tx, false to skip them.

getCheckedActionFactoryClassName

public String getCheckedActionFactoryClassName()
Returns the class name of an implementation of CheckedActionFactory Default: "com.arjuna.ats.internal.arjuna.coordinator.CheckedActionFactoryImple" Equivalent deprecated property: com.arjuna.ats.coordinator.checkedActionFactory

Specified by:
getCheckedActionFactoryClassName in interface CoordinatorEnvironmentBeanMBean
Returns:
the class name of the CheckedActionFactory implementation to use.

setCheckedActionFactoryClassName

public void setCheckedActionFactoryClassName(String checkedActionFactoryClassName)
Sets the class name of the CheckedActionFactory implementation.

Parameters:
checkedActionFactoryClassName - the name of a class that implements CheckedActionFactory.

getCheckedActionFactory

public CheckedActionFactory getCheckedActionFactory()
Returns an instance of a class implementing CheckedActionFactory. If there is no pre-instantiated instance set and classloading or instantiation fails, this method will log appropriate warning and return null, not throw an exception.

Returns:
a CheckedActionFactory implementation instance, or null.

setCheckedActionFactory

public void setCheckedActionFactory(CheckedActionFactory instance)
Sets the instance of CheckedActionFactory.

Parameters:
instance - an Object that implements CheckedActionFactory, or null.

isAlternativeRecordOrdering

public boolean isAlternativeRecordOrdering()
Whether to use the alternative abstract record ordering. At present this is not fully documented, so stay away! Default: false

Returns:
true if order abstract records on type first, or false if order on Uid first.

setAlternativeRecordOrdering

public void setAlternativeRecordOrdering(boolean alternativeRecordOrdering)
Set whether or not to use the alternative abstract record ordering. Don't try this whilst the system is running!

Parameters:
alternativeRecordOrdering - true for alternative (i.e. type) ordering, false for normal (i.e. Uid) ordering.

getCommunicationStore

public String getCommunicationStore()
Returns the symbolic name for the communication store type. Default: "HashedActionStore"

Specified by:
getCommunicationStore in interface CoordinatorEnvironmentBeanMBean
Returns:
the communication store name.

setCommunicationStore

public void setCommunicationStore(String communicationStore)
Sets the symbolic name of the communication store.

Parameters:
communicationStore - the communication store name.

isFinalizeBasicActions

public boolean isFinalizeBasicActions()
Sets whether or not to use finalizers for BasicActions (i.e. transactions). This can provide a useful safety net to ensure cleanup of locks and other resources, but does not perform well. In most cases it's preferable to set a transaction timeout and rely on the reaper for cleanup. Default: false

Returns:
true if a finalize method should be registered for BasicActions instances, false otherwise.

setFinalizeBasicActions

public void setFinalizeBasicActions(boolean finalizeBasicActions)
Sets whether or not to use finalizers for BasicActions (i.e. transactions).

Parameters:
finalizeBasicActions - true to enable finalization, false to disable.


Copyright © 2011. All Rights Reserved.