Package com.arjuna.ats.arjuna.common
Class RecoveryEnvironmentBean
java.lang.Object
com.arjuna.ats.arjuna.common.RecoveryEnvironmentBean
- All Implemented Interfaces:
RecoveryEnvironmentBeanMBean
A JavaBean containing configuration properties for the recovery system.
- Author:
- Jonathan Halliday (jonathan.halliday@redhat.com)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintReturns the interval on which the ObjectStore will be scanned for expired items, in hours.Returns a list of names of classes that implement ExpiryScanner.Returns the set of ExpiryScanner instances.intReturns the initial period to wait before starting recovery.intReturns the interval between recovery scans, in seconds.Returns a list of names of classes that implement RecoveryActivator.Returns the set of RecoveryActivator instances.Returns the hostname on which the recovery listener should bind.intReturns the interval between recovery phases within a recovery scan, in seconds.Returns a list of names of classes that implement RecoveryModule.Returns the set of RecoveryModule instances.intReturns the network port number on which the recovery listener should bind.Returns the hostname on which the transaction status manager should bind.intReturns the time period after which items will be considered to have expired, in hours.intReturns the network port number on which the transaction status manager should bind.booleanReturns true if the recovery system should listen on a network socket.booleanReturns true if SO_TIMEOUT should be set on Listener socket instances.voidsetExpiryScanInterval(int expiryScanInterval) Sets the interval on which the ObjectStore will be scanned for expired items, in hours.voidsetExpiryScannerClassNames(List<String> expiryScannerClassNames) Sets the expiry scanners.voidsetExpiryScanners(List<ExpiryScanner> expiryScanners) Sets the instances of ExpiryScanner.setPeriodicRecoveryInitilizationOffset(int periodicRecoveryInitilizationOffset) Set the period of time to wait before starting recovery.voidsetPeriodicRecoveryPeriod(int periodicRecoveryPeriod) Sets the interval between recovery scans, in seconds.voidsetRecoveryActivatorClassNames(List<String> recoveryActivatorClassNames) Sets the recovery activators.voidsetRecoveryActivators(List<RecoveryActivator> recoveryActivators) Sets the instances of RecoveryActivator.voidsetRecoveryAddress(String recoveryAddress) Sets the hostname on which the recovery listener should bind.voidsetRecoveryBackoffPeriod(int recoveryBackoffPeriod) Sets the interval between recovery phases, in seconds.voidsetRecoveryInetAddress(InetAddress inetAddress) Sets the InetAddress on which the recovery listener should bind.voidsetRecoveryListener(boolean recoveryListener) Sets if the recovery system should listen on a network socket or not.voidsetRecoveryModuleClassNames(List<String> recoveryModuleClassNames) Sets the recovery modules.voidsetRecoveryModules(List<RecoveryModule> recoveryModules) Sets the instances of RecoveryModule.voidsetRecoveryPort(int recoveryPort) Sets the network port number on which the recovery listener should bind.voidsetTimeoutSocket(boolean timeoutSocket) Sets the socket timeout behaviour of the Listener instances.voidsetTransactionStatusManagerAddress(String transactionStatusManagerAddress) Sets the hostname on which the transaction status manager should bind.voidsetTransactionStatusManagerExpiryTime(int transactionStatusManagerExpiryTime) Sets the time period after which items will be considered to have expired, in hours.voidsetTransactionStatusManagerInetAddress(InetAddress inetAddress) Sets the InetAddress on which the transaction status manager should bind.voidsetTransactionStatusManagerPort(int transactionStatusManagerPort) Sets the network port number on which the transaction status manager should bind.
-
Constructor Details
-
RecoveryEnvironmentBean
public RecoveryEnvironmentBean()
-
-
Method Details
-
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:
getPeriodicRecoveryPeriodin interfaceRecoveryEnvironmentBeanMBean- Returns:
- the recovery scan period, in seconds.
-
setPeriodicRecoveryPeriod
public void setPeriodicRecoveryPeriod(int periodicRecoveryPeriod) Sets the interval between recovery scans, in seconds.- 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:
getRecoveryBackoffPeriodin interfaceRecoveryEnvironmentBeanMBean- Returns:
- the interval between recovery phases, in seconds.
-
setRecoveryBackoffPeriod
public void setRecoveryBackoffPeriod(int recoveryBackoffPeriod) Sets the interval between recovery phases, in seconds.- Parameters:
recoveryBackoffPeriod- the interval between recovery scan phases, in seconds.
-
getPeriodicRecoveryInitilizationOffset
public int getPeriodicRecoveryInitilizationOffset()Returns the initial period to wait before starting recovery. Useful when starting multiple servers at once.- Returns:
- The initial offset (in seconds)
-
setPeriodicRecoveryInitilizationOffset
public RecoveryEnvironmentBean setPeriodicRecoveryInitilizationOffset(int periodicRecoveryInitilizationOffset) Set the period of time to wait before starting recovery.- Parameters:
periodicRecoveryInitilizationOffset- The period (in seconds) to wait before starting first recovery run.
-
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:
isRecoveryListenerin interfaceRecoveryEnvironmentBeanMBean- 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.- 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:
getRecoveryPortin interfaceRecoveryEnvironmentBeanMBean- 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.- Parameters:
recoveryPort- the port number for the recovery listener.
-
getRecoveryAddress
Returns the hostname on which the recovery listener should bind. Default: "localhost" Equivalent deprecated property: com.arjuna.ats.arjuna.recovery.recoveryAddress- Specified by:
getRecoveryAddressin interfaceRecoveryEnvironmentBeanMBean- Returns:
- the hostname on which the recovery system will listen.
-
setRecoveryAddress
Sets the hostname on which the recovery listener should bind.- Parameters:
recoveryAddress- the hostname on which the recovery system will listen.
-
setRecoveryInetAddress
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:
getTransactionStatusManagerPortin interfaceRecoveryEnvironmentBeanMBean- 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.- Parameters:
transactionStatusManagerPort- the port number for the transaction status manager listener.
-
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:
getTransactionStatusManagerAddressin interfaceRecoveryEnvironmentBeanMBean- Returns:
- the hostname on which the transaction status manager will listen.
-
setTransactionStatusManagerAddress
Sets the hostname on which the transaction status manager should bind.- Parameters:
transactionStatusManagerAddress- the hostname on which the transaction status manager will listen.
-
setTransactionStatusManagerInetAddress
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:
getExpiryScanIntervalin interfaceRecoveryEnvironmentBeanMBean- 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.- 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:
getTransactionStatusManagerExpiryTimein interfaceRecoveryEnvironmentBeanMBean- 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.- Parameters:
transactionStatusManagerExpiryTime- the expiry timeout, in hours.
-
getExpiryScannerClassNames
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:
getExpiryScannerClassNamesin interfaceRecoveryEnvironmentBeanMBean- Returns:
- a list of ExpiryScanner implementation class names.
-
setExpiryScannerClassNames
Sets the expiry scanners. List elements should be names of classes that implement ExpiryScanner. The provided list will be copied, not retained.- Parameters:
expiryScannerClassNames- a list of ExpiryScanner implementation class names.
-
getExpiryScanners
Returns the set of ExpiryScanner instances. The returned list is a copy. May return an empty list, will not return null. If there is no pre-instantiated instance set and classloading or instantiation of one or more elements fails, this method will log an appropriate warning and return a non-null set with fewer elements.- Returns:
- the set of ExpiryScanner instances.
-
setExpiryScanners
Sets the instances of ExpiryScanner. The provided list will be copied, not retained.- Parameters:
expiryScanners- the set of ExpiryScanner instances.
-
getRecoveryModuleClassNames
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:
getRecoveryModuleClassNamesin interfaceRecoveryEnvironmentBeanMBean- Returns:
- a list of RecoveryModule implementation class names.
-
setRecoveryModuleClassNames
Sets the recovery modules. List elements should be names of classes that implement RecoveryModule. The provided list will be copied, not retained.- Parameters:
recoveryModuleClassNames- a list of RecoveryModule implementation class names.
-
getRecoveryModules
Returns the set of RecoveryModule instances. The returned list is a copy. May return an empty list, will not return null. If there is no pre-instantiated instance set and classloading or instantiation of one or more elements fails, this method will log an appropriate warning and return a non-null set with fewer elements.- Returns:
- the set of RecoveryModule instances.
-
setRecoveryModules
Sets the instances of RecoveryModule. The provided list will be copied, not retained.- Parameters:
recoveryModules- the set of RecoveryModule instances.
-
getRecoveryActivatorClassNames
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:
getRecoveryActivatorClassNamesin interfaceRecoveryEnvironmentBeanMBean- Returns:
- a list of RecoveryActivator implementation class names.
-
setRecoveryActivatorClassNames
Sets the recovery activators. List elements should be names of classes that implement RecoveryActivator. The provided list will be copied, not retained.- Parameters:
recoveryActivatorClassNames- a list of RecoveryActivator implementation class names.
-
getRecoveryActivators
Returns the set of RecoveryActivator instances. The returned list is a copy. May return an empty list, will not return null. If there is no pre-instantiated instance set and classloading or instantiation of one or more elements fails, this method will log an appropriate warning and return a non-null set with fewer elements.- Returns:
- the set of RecoveryActivator instances.
-
setRecoveryActivators
Sets the instances of RecoveryActivator. The provided list will be copied, not retained.- Parameters:
recoveryActivators- the set of RecoveryActivator instances.
-
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:
isTimeoutSocketin interfaceRecoveryEnvironmentBeanMBean- 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.- Parameters:
timeoutSocket- true to enable timeouts, false to disable.
-