com.arjuna.ats.arjuna.common
Class RecoveryEnvironmentBean

java.lang.Object
  extended by com.arjuna.ats.arjuna.common.RecoveryEnvironmentBean
All Implemented Interfaces:
RecoveryEnvironmentBeanMBean

public class RecoveryEnvironmentBean
extends java.lang.Object
implements RecoveryEnvironmentBeanMBean

A JavaBean containing configuration properties for the recovery system.

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

Constructor Summary
RecoveryEnvironmentBean()
           
 
Method Summary
 int getExpiryScanInterval()
          Returns the interval on which the ObjectStore will be scanned for expired items, in hours.
 java.util.List<java.lang.String> getExpiryScanners()
          Returns a list of names of classes that implement ExpiryScanner.
 int getPeriodicRecoveryPeriod()
          Returns the interval between recovery scans, in seconds.
 java.util.List<java.lang.String> getRecoveryActivators()
          Returns a list of names of classes that implement RecoveryActivator.
 java.lang.String getRecoveryAddress()
          Returns the hostname on which the recovery listener shoud bind.
 int getRecoveryBackoffPeriod()
          Returns the interval between recovery phases within a recovery scan, in seconds.
 java.util.List<java.lang.String> getRecoveryExtensions()
          Returns a list of names of classes that implement RecoveryModule.
 int getRecoveryPort()
          Returns the network port number on which the recovery listener should bind.
 java.lang.String getTransactionStatusManagerAddress()
          Returns the hostname on which the transaction status manager should bind.
 int getTransactionStatusManagerExpiryTime()
          Returns the time period after which items will be considered to have expired, in hours.
 int getTransactionStatusManagerPort()
          Returns the network port number on which the transaction status manager should bind.
 boolean isRecoveryListener()
          Returns true if the recovery system should listen on a network socket.
 boolean isTimeoutSocket()
          Returns true if SO_TIMEOUT should be set on Listener socket instances.
 void setExpiryScanInterval(int expiryScanInterval)
          Sets the interval on which the ObjectStore will be scanned for expired items, in hours.
 void setExpiryScanners(java.util.List<java.lang.String> expiryScanners)
          Sets the expiry scanners.
 void setPeriodicRecoveryPeriod(int periodicRecoveryPeriod)
          Sets the interval between recovery scans, in seconds.
 void setRecoveryActivators(java.util.List<java.lang.String> recoveryActivators)
          Sets the recovery activators.
 void setRecoveryAddress(java.lang.String recoveryAddress)
          Sets the hostname on which the recovery listener should bind.
 void setRecoveryBackoffPeriod(int recoveryBackoffPeriod)
          Sets the interval between recovery phases, in seconds.
 void setRecoveryExtensions(java.util.List<java.lang.String> recoveryExtensions)
          Sets the recovery modules.
 void setRecoveryInetAddress(java.net.InetAddress inetAddress)
          Sets the InetAddress on which the recovery listener should bind.
 void setRecoveryListener(boolean recoveryListener)
          Sets if the recovery system should listen on a network socket or not.
 void setRecoveryPort(int recoveryPort)
          Sets the network port number on which the recovery listener should bind.
 void setTimeoutSocket(boolean timeoutSocket)
          Sets the socket timeout behaviour of the Listener instances.
 void setTransactionStatusManagerAddress(java.lang.String transactionStatusManagerAddress)
          Sets the hostname on which the transaction status manager should bind.
 void setTransactionStatusManagerExpiryTime(int transactionStatusManagerExpiryTime)
          Sets the time period after which items will be considered to have expired, in hours.
 void setTransactionStatusManagerInetAddress(java.net.InetAddress inetAddress)
          Sets the InetAddress on which the transaction status manager should bind.
 void setTransactionStatusManagerPort(int transactionStatusManagerPort)
          Sets the network port number on which the transaction status manager should bind.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RecoveryEnvironmentBean

public RecoveryEnvironmentBean()
Method Detail

getPeriodicRecoveryPeriod

public int getPeriodicRecoveryPeriod()
Returns the interval between recovery scans, in seconds. Default: 120 seconds Equivalent deprecated property: com.arjuna.ats.arjuna.recovery.periodicRecoveryPeriod

Specified by:
getPeriodicRecoveryPeriod in interface RecoveryEnvironmentBeanMBean
Returns:
the recovery scan period, in seconds.

setPeriodicRecoveryPeriod

public void setPeriodicRecoveryPeriod(int periodicRecoveryPeriod)
Sets the interval between recovery scans, in seconds.

Specified by:
setPeriodicRecoveryPeriod in interface RecoveryEnvironmentBeanMBean
Parameters:
periodicRecoveryPeriod - the recovery scan period, in seconds.

getRecoveryBackoffPeriod

public int getRecoveryBackoffPeriod()
Returns the interval between recovery phases within a recovery scan, in seconds. Default: 10 seconds Equivalent deprecated property: com.arjuna.ats.arjuna.recovery.recoveryBackoffPeriod

Specified by:
getRecoveryBackoffPeriod in interface RecoveryEnvironmentBeanMBean
Returns:
the interval between recovery phases, in seconds.

setRecoveryBackoffPeriod

public void setRecoveryBackoffPeriod(int recoveryBackoffPeriod)
Sets the interval between recovery phases, in seconds.

Specified by:
setRecoveryBackoffPeriod in interface RecoveryEnvironmentBeanMBean
Parameters:
recoveryBackoffPeriod - the interval between recovery scan phases, in seconds.

isRecoveryListener

public boolean isRecoveryListener()
Returns true if the recovery system should listen on a network socket. Default: true Equivalent deprecated property: com.arjuna.ats.arjuna.recovery.recoveryListener

Specified by:
isRecoveryListener in interface RecoveryEnvironmentBeanMBean
Returns:
true for network recovery, false for local JVM only use.

setRecoveryListener

public void setRecoveryListener(boolean recoveryListener)
Sets if the recovery system should listen on a network socket or not.

Specified by:
setRecoveryListener in interface RecoveryEnvironmentBeanMBean
Parameters:
recoveryListener - true for network use, false for local JVM only.

getRecoveryPort

public int getRecoveryPort()
Returns the network port number on which the recovery listener should bind. Default: 0 Equivalent deprecated property: com.arjuna.ats.arjuna.recovery.recoveryPort

Specified by:
getRecoveryPort in interface RecoveryEnvironmentBeanMBean
Returns:
the port number for recovery listener.

setRecoveryPort

public void setRecoveryPort(int recoveryPort)
Sets the network port number on which the recovery listener should bind.

Specified by:
setRecoveryPort in interface RecoveryEnvironmentBeanMBean
Parameters:
recoveryPort - the port number for the recovery listener.

getRecoveryAddress

public java.lang.String getRecoveryAddress()
Returns the hostname on which the recovery listener shoud bind. Default: "localhost" Equivalent deprecated property: com.arjuna.ats.arjuna.recovery.recoveryAddress

Specified by:
getRecoveryAddress in interface RecoveryEnvironmentBeanMBean
Returns:
the hostname on which the recovery system will listen.

setRecoveryAddress

public void setRecoveryAddress(java.lang.String recoveryAddress)
Sets the hostname on which the recovery listener should bind.

Specified by:
setRecoveryAddress in interface RecoveryEnvironmentBeanMBean
Parameters:
recoveryAddress - the hostname on which the recovery system will listen.

setRecoveryInetAddress

public void setRecoveryInetAddress(java.net.InetAddress inetAddress)
Sets the InetAddress on which the recovery listener should bind. Mainly intended for use by strongly typed bean injection systems, this is a wrapper around the String form of the method.

Parameters:
inetAddress - the address on which to bind the recovery listener.

getTransactionStatusManagerPort

public int getTransactionStatusManagerPort()
Returns the network port number on which the transaction status manager should bind. Default: 0 Equivalent deprecated property: com.arjuna.ats.arjuna.recovery.transactionStatusManagerPort

Specified by:
getTransactionStatusManagerPort in interface RecoveryEnvironmentBeanMBean
Returns:
the port number for the transaction status manager listener.

setTransactionStatusManagerPort

public void setTransactionStatusManagerPort(int transactionStatusManagerPort)
Sets the network port number on which the transaction status manager should bind.

Specified by:
setTransactionStatusManagerPort in interface RecoveryEnvironmentBeanMBean
Parameters:
transactionStatusManagerPort - the port number for the transaction status manager listener.

getTransactionStatusManagerAddress

public java.lang.String getTransactionStatusManagerAddress()
Returns the hostname on which the transaction status manager should bind. Default: "localhost" Equivalent deprecated property: com.arjuna.ats.arjuna.recovery.transactionStatusManagerAddress

Specified by:
getTransactionStatusManagerAddress in interface RecoveryEnvironmentBeanMBean
Returns:
the hostname on which the transaction status manager will listen.

setTransactionStatusManagerAddress

public void setTransactionStatusManagerAddress(java.lang.String transactionStatusManagerAddress)
Sets the hostname on which the transaction status manager should bind.

Specified by:
setTransactionStatusManagerAddress in interface RecoveryEnvironmentBeanMBean
Parameters:
transactionStatusManagerAddress - the hostname on which the transaction status manager will listen.

setTransactionStatusManagerInetAddress

public void setTransactionStatusManagerInetAddress(java.net.InetAddress inetAddress)
Sets the InetAddress on which the transaction status manager should bind. Mainly intended for use by strongly typed bean injection systems, this is a wrapper around the String form of the method.

Parameters:
inetAddress - the address on which to bind the transaction status manager.

getExpiryScanInterval

public int getExpiryScanInterval()
Returns the interval on which the ObjectStore will be scanned for expired items, in hours. Default: 12 hours Equivalent deprecated property: com.arjuna.ats.arjuna.recovery.expiryScanInterval

Specified by:
getExpiryScanInterval in interface RecoveryEnvironmentBeanMBean
Returns:
the interval between ObjectStore expiry checks, in hours.

setExpiryScanInterval

public void setExpiryScanInterval(int expiryScanInterval)
Sets the interval on which the ObjectStore will be scanned for expired items, in hours.

Specified by:
setExpiryScanInterval in interface RecoveryEnvironmentBeanMBean
Parameters:
expiryScanInterval - the interval between ObjectStore expiry checks, in hours.

getTransactionStatusManagerExpiryTime

public int getTransactionStatusManagerExpiryTime()
Returns the time period after which items will be considered to have expired, in hours. Default: 12 hours Equivalent deprecated property: com.arjuna.ats.arjuna.recovery.transactionStatusManagerExpiryTime

Specified by:
getTransactionStatusManagerExpiryTime in interface RecoveryEnvironmentBeanMBean
Returns:
the expiry timeout, in hours.

setTransactionStatusManagerExpiryTime

public void setTransactionStatusManagerExpiryTime(int transactionStatusManagerExpiryTime)
Sets the time period after which items will be considered to have expired, in hours.

Specified by:
setTransactionStatusManagerExpiryTime in interface RecoveryEnvironmentBeanMBean
Parameters:
transactionStatusManagerExpiryTime - the expiry timeout, in hours.

getExpiryScanners

public java.util.List<java.lang.String> getExpiryScanners()
Returns a list of names of classes that implement ExpiryScanner. The returned list is a copy. May return an empty list, will not return null. Default: empty list. Equivalent deprecated property prefix: com.arjuna.ats.arjuna.recovery.expiryScanner

Specified by:
getExpiryScanners in interface RecoveryEnvironmentBeanMBean
Returns:
a list of ExpiryScanner implementation class names.

setExpiryScanners

public void setExpiryScanners(java.util.List<java.lang.String> expiryScanners)
Sets the expiry scanners. List elements should be names of classes that implement ExpiryScanner. The provided list will be copied, not retained.

Specified by:
setExpiryScanners in interface RecoveryEnvironmentBeanMBean
Parameters:
expiryScanners - a list of ExpiryScanner implementation class names.

getRecoveryExtensions

public java.util.List<java.lang.String> getRecoveryExtensions()
Returns a list of names of classes that implement RecoveryModule. The returned list is a copy. May return an empty list, will not return null. Default: empty list. Equivalent deprecated property prefix:

Specified by:
getRecoveryExtensions in interface RecoveryEnvironmentBeanMBean
Returns:
a list of RecoveryModule implementation class names.

setRecoveryExtensions

public void setRecoveryExtensions(java.util.List<java.lang.String> recoveryExtensions)
Sets the recovery modules. List elements should be names of classes that implement RecoveryModule. The provided list will be copied, not retained.

Specified by:
setRecoveryExtensions in interface RecoveryEnvironmentBeanMBean
Parameters:
recoveryExtensions - a list of RecoveryModule implementation class names.

getRecoveryActivators

public java.util.List<java.lang.String> getRecoveryActivators()
Returns a list of names of classes that implement RecoveryActivator. The returned list is a copy. May return an empty list, will not return null. Default: empty list. Equivalent deprecated property prefix:

Specified by:
getRecoveryActivators in interface RecoveryEnvironmentBeanMBean
Returns:
a list of RecoveryActivator implementation class names.

setRecoveryActivators

public void setRecoveryActivators(java.util.List<java.lang.String> recoveryActivators)
Sets the recovery activators. List elements should be names of classes that implement RecoveryActivator. The provided list will be copied, not retained.

Specified by:
setRecoveryActivators in interface RecoveryEnvironmentBeanMBean
Parameters:
recoveryActivators - a list of RecoveryActivator implementation class names.

isTimeoutSocket

public boolean isTimeoutSocket()
Returns true if SO_TIMEOUT should be set on Listener socket instances. Default: false Equivalent deprecated property: com.arjuna.ats.internal.arjuna.recovery.listener.timeoutsocket

Specified by:
isTimeoutSocket in interface RecoveryEnvironmentBeanMBean
Returns:
true if SO_TIMEOUT should be used, false if not.

setTimeoutSocket

public void setTimeoutSocket(boolean timeoutSocket)
Sets the socket timeout behaviour of the Listener instances.

Specified by:
setTimeoutSocket in interface RecoveryEnvironmentBeanMBean
Parameters:
timeoutSocket - true to enable timeouts, false to disable.