public class FailoverRoundRobinServers extends Object implements FailoverMethod
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_CYCLE_RETRIES
The default number of times to cycle through all servers
|
static int |
DEFAULT_SERVER_RETRIES
The default number of times to retry each server
|
FAILOVER_EXCHANGE, NO_FAILOVER, RANDOM, ROUND_ROBIN, SINGLE_BROKER| Constructor and Description |
|---|
FailoverRoundRobinServers(ConnectionURL connectionDetails) |
| Modifier and Type | Method and Description |
|---|---|
void |
attainedConnection()
Notification to the Failover method that a connection has been attained.
|
boolean |
failoverAllowed()
Check if failover is possible for this method
|
BrokerDetails |
getCurrentBrokerDetails()
If there is no current BrokerDetails the null will be returned.
|
BrokerDetails |
getNextBrokerDetails()
Move to the next BrokerDetails if one is available.
|
String |
methodName() |
void |
reset()
Reset the Failover to initial conditions
|
void |
setBroker(BrokerDetails broker)
Set the currently active broker to be the new value.
|
void |
setRetries(int maxRetries)
Set the retries for this method
|
String |
toString() |
public static final int DEFAULT_CYCLE_RETRIES
public static final int DEFAULT_SERVER_RETRIES
public FailoverRoundRobinServers(ConnectionURL connectionDetails)
public void reset()
FailoverMethodreset in interface FailoverMethodpublic boolean failoverAllowed()
FailoverMethodfailoverAllowed in interface FailoverMethodpublic void attainedConnection()
FailoverMethodattainedConnection in interface FailoverMethodpublic BrokerDetails getCurrentBrokerDetails()
FailoverMethodgetCurrentBrokerDetails in interface FailoverMethodpublic BrokerDetails getNextBrokerDetails()
FailoverMethodgetNextBrokerDetails in interface FailoverMethodpublic void setBroker(BrokerDetails broker)
FailoverMethodsetBroker in interface FailoverMethodbroker - The new BrokerDetail valuepublic void setRetries(int maxRetries)
FailoverMethodsetRetries in interface FailoverMethodmaxRetries - the maximum number of time to retry this Methodpublic String methodName()
methodName in interface FailoverMethodCopyright © 2006–2017 The Apache Software Foundation. All rights reserved.