public interface FailoverMethod
Modifier and Type | Field and Description |
---|---|
static String |
FAILOVER_EXCHANGE |
static String |
NO_FAILOVER |
static String |
RANDOM |
static String |
ROUND_ROBIN |
static String |
SINGLE_BROKER |
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
|
static final String SINGLE_BROKER
static final String ROUND_ROBIN
static final String FAILOVER_EXCHANGE
static final String RANDOM
static final String NO_FAILOVER
void reset()
boolean failoverAllowed()
void attainedConnection()
BrokerDetails getCurrentBrokerDetails()
BrokerDetails getNextBrokerDetails()
void setBroker(BrokerDetails broker)
broker
- The new BrokerDetail valuevoid setRetries(int maxRetries)
maxRetries
- the maximum number of time to retry this MethodString methodName()
Copyright © 2006–2016 The Apache Software Foundation. All rights reserved.