|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.activemq.network.jms.ReconnectionPolicy
public class ReconnectionPolicy
A policy object that defines how a JmsConnector
deals with
reconnection of the local and foreign connections.
Constructor Summary | |
---|---|
ReconnectionPolicy()
|
Method Summary | |
---|---|
double |
getBackOffMultiplier()
Gets the multiplier used to grow the delay between connection attempts from the initial time to the max set time. |
long |
getInitialReconnectDelay()
Gets the initial delay value used before a reconnection attempt is made. |
long |
getMaximumReconnectDelay()
Gets the maximum delay that is inserted between each attempt to connect before another attempt is made. |
int |
getMaxInitialConnectAttempts()
Gets the maximum number of times that the JmsConnector will try
to connect on startup to before it marks itself as failed and does not
try any further connections. |
int |
getMaxReconnectAttempts()
Gets the number of time that JmsConnector will attempt to connect
or reconnect before giving up. |
int |
getMaxSendRetries()
Gets the maximum number of a times a Message send should be retried before a JMSExeception is thrown indicating that the operation failed. |
long |
getNextDelay(int attempt)
Returns the next computed delay value that the connection controller should use to wait before attempting another connection for the JmsConnector . |
long |
getSendRetryDelay()
Get the amount of time the DestionationBridge will wait between attempts to forward a message. |
boolean |
isUseExponentialBackOff()
Gets whether the policy uses the set back-off multiplier to grow the time between connection attempts. |
void |
setBackOffMultiplier(double backOffMultiplier)
Gets the multiplier used to grow the delay between connection attempts from the initial time to the max set time. |
void |
setInitialReconnectDelay(long initialReconnectDelay)
Gets the initial delay value used before a reconnection attempt is made. |
void |
setMaximumReconnectDelay(long maximumReconnectDelay)
Sets the maximum delay that is inserted between each attempt to connect before another attempt is made. |
void |
setMaxInitialConnectAttempts(int maxAttempts)
Sets the maximum number of times that the JmsConnector will try
to connect on startup to before it marks itself as failed and does not
try any further connections. |
void |
setMaxReconnectAttempts(int maxReconnectAttempts)
Sets the number of time that JmsConnector will attempt to connect
or reconnect before giving up. |
void |
setMaxSendRetries(int maxSendRetries)
Sets the maximum number of a times a Message send should be retried before a JMSExeception is thrown indicating that the operation failed. |
void |
setSendRetyDelay(long sendRetryDelay)
Set the amount of time the DestionationBridge will wait between attempts to forward a message. |
void |
setUseExponentialBackOff(boolean useExponentialBackOff)
Sets whether the policy uses the set back-off multiplier to grow the time between connection attempts. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ReconnectionPolicy()
Method Detail |
---|
public int getMaxSendRetries()
public void setMaxSendRetries(int maxSendRetries)
maxRetries
- number of send retries that will be performed.public long getSendRetryDelay()
public void setSendRetyDelay(long sendRetryDelay)
sendRetryDelay
- Time in milliseconds to wait before attempting another send.public int getMaxReconnectAttempts()
JmsConnector
will attempt to connect
or reconnect before giving up. By default the policy sets this value to
a negative value meaning try forever.
public void setMaxReconnectAttempts(int maxReconnectAttempts)
JmsConnector
will attempt to connect
or reconnect before giving up. By default the policy sets this value to
a negative value meaning try forever, set to a positive value to retry a
fixed number of times, or zero to never try and reconnect.
maxReconnectAttempts
- public int getMaxInitialConnectAttempts()
JmsConnector
will try
to connect on startup to before it marks itself as failed and does not
try any further connections.
public void setMaxInitialConnectAttempts(int maxAttempts)
JmsConnector
will try
to connect on startup to before it marks itself as failed and does not
try any further connections.
maxAttempts
- The max number of times a connection attempt is made before failing.public long getMaximumReconnectDelay()
public void setMaximumReconnectDelay(long maximumReconnectDelay)
maximumReconnectDelay
- The maximum delay between connection attempts in milliseconds.public long getInitialReconnectDelay()
public void setInitialReconnectDelay(long initialReconnectDelay)
initialReconnectDelay
- Time in milliseconds to wait before the first reconnection attempt.public boolean isUseExponentialBackOff()
public void setUseExponentialBackOff(boolean useExponentialBackOff)
useExponentialBackOff
- public double getBackOffMultiplier()
public void setBackOffMultiplier(double backOffMultiplier)
backOffMultiplier
- The multiplier value used to grow the reconnection delay.public long getNextDelay(int attempt)
JmsConnector
.
attempt
- The current connection attempt.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |