Class CoordinatorEnvironmentBean

    • Constructor Detail

      • CoordinatorEnvironmentBean

        public CoordinatorEnvironmentBean()
    • Method Detail

      • 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. If true then a separate thread will be created to complete the second phase of the action (provided that knowledge about heuristic outcomes is not required).
        Parameters:
        asyncCommit - true to enable asynchronous commit, false to disable.
      • isAsyncPrepare

        public boolean isAsyncPrepare()
        Returns true if asynchronous prepare behaviour is enabled. If true then during the prepare phase of an action a separate thread will be created for preparing each participant registered with the action 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. If true then a separate thread will be created to complete the second phase of the action 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.
      • getMaxTwoPhaseCommitThreads

        public int getMaxTwoPhaseCommitThreads()
        Returns maximum thread pool size allowed for two phase commits. Default: 100
        Returns:
        maximum number of threads in a thread pool
      • setMaxTwoPhaseCommitThreads

        public void setMaxTwoPhaseCommitThreads​(int maxTwoPhaseCommitThreads)
        Sets maximum thread pool size for two phase commits.
        Parameters:
        maxTwoPhaseCommitThreads - maximum number of threads in a thread pool
      • 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.
      • getDynamic1PC

        public boolean getDynamic1PC()
        Returns true if dynamic one phase commit optimization is to be used. This means that if the first N-1 participants in the intentions list return read-only then commit_one_phase will be called on the last participant. Default: true Equivalent deprecated property: com.arjuna.ats.arjuna.coordinator.dynamic1PC
        Returns:
        true if one phase commit is enabled, false otherwise.
      • setDynamic1PC

        public void setDynamic1PC​(boolean dynamic1PC)
        Sets if dynamic one phase commit behaviour is enabled or not.
        Parameters:
        dynamic1PC - 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 style 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 style 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

        @Deprecated
        public boolean isSharedTransactionLog()
        Deprecated.
        Returns if the transaction log should 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

        @Deprecated
        public void setSharedTransactionLog​(boolean sharedTransactionLog)
        Deprecated.
        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 after 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 after 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.
      • getTxReaperTraceGracePeriod

        public long getTxReaperTraceGracePeriod()
        Returns the number of milliseconds delay after a transaction is started, before the reaper will start taking periodic stack traces from it. Default: 180000 (3 minutes)
        Specified by:
        getTxReaperTraceGracePeriod in interface CoordinatorEnvironmentBeanMBean
        Returns:
        the reaper tracing grace period, in milliseconds.
      • setTxReaperTraceGracePeriod

        public void setTxReaperTraceGracePeriod​(long txReaperTraceGracePeriod)
        Sets the delay after a transaction is started, before it is eligible for periodic tracing.
        Parameters:
        txReaperTraceGracePeriod - in milliseconds.
      • getTxReaperTraceInterval

        public long getTxReaperTraceInterval()
        Returns the number of milliseconds interval between transaction stack trace snapshots. Default: 30000 (30 seconds)
        Specified by:
        getTxReaperTraceInterval in interface CoordinatorEnvironmentBeanMBean
        Returns:
        the reaper tracing interval, in milliseconds.
      • setTxReaperTraceInterval

        public void setTxReaperTraceInterval​(long txReaperTraceInterval)
        Sets the interval between stack trace snapshots.
        Parameters:
        txReaperTraceInterval - in milliseconds.
      • 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.
      • setCommunicationStore

        @Deprecated
        public void setCommunicationStore​(String communicationStore)
        Deprecated.
        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.
      • isAsyncBeforeSynchronization

        public boolean isAsyncBeforeSynchronization()
        Returns true if asynchronous before completion behaviour is enabled. The option is applicable to the volatile phase of the two phase commit protocol which provides a synchronization mechanism that allows an interested party to be notified before and after the transaction completes. If set to true then the beforeCompletion method will be called on all non interposed synchronizations in parallel, after which the beforeCompletion method will be called on all interposed synchronizations in parallel. Default: false
        Returns:
        true if asynchronous before completion is enabled, value otherwise.
      • setAsyncBeforeSynchronization

        public void setAsyncBeforeSynchronization​(boolean asyncBeforeSynchronization)
        Sets if asynchronous before completion behaviour should be enabled or not.
        Parameters:
        asyncBeforeSynchronization - true to enable asynchronous before completion, false to disable.
      • isAsyncAfterSynchronization

        public boolean isAsyncAfterSynchronization()
        Returns true if asynchronous after completion behaviour is enabled. The option is applicable to the volatile phase of the two phase commit protocol which provides a synchronization mechanism that allows an interested party to be notified before and after the transaction completes. If set to true then the afterCompletion method will be called on all interposed synchronizations in parallel, after which the afterCompletion method will be called on all non interposed synchronizations in parallel. Caveat: if an action is committed and the caller wishes to be notified of heuristics outcomes then this behaviour is not available and the afterCompletion callbacks will be invoked synchronously. . Default: false
        Returns:
        true if asynchronous after completion is enabled, value otherwise.
      • setAsyncAfterSynchronization

        public void setAsyncAfterSynchronization​(boolean asyncAfterSynchronization)
        Sets if asynchronous after completion behaviour should be enabled or not.
        Parameters:
        asyncAfterSynchronization - true to enable asynchronous after completion, false to disable.
      • isAllowCheckedActionFactoryOverride

        public boolean isAllowCheckedActionFactoryOverride()
        Returns true if configured to allow the checked action factory to be overriden Default: true
        Returns:
        true if checked action factory can be overriden, false otherwise.
      • setAllowCheckedActionFactoryOverride

        public void setAllowCheckedActionFactoryOverride​(boolean allowCheckedActionFactoryOverride)
        Can be enabled to allow the checked action factory to be overridden at runtime
        Parameters:
        allowCheckedActionFactoryOverride - Allow the checked action factory to be overriden