|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.activemq.transport.failover.FailoverTransport
public class FailoverTransport
A Transport that is made reliable by being able to fail over to another transport when a transport failure is detected.
| Constructor Summary | |
|---|---|
FailoverTransport()
|
|
| Method Summary | ||
|---|---|---|
void |
add(boolean rebalance,
String u)
|
|
void |
add(boolean rebalance,
URI[] u)
|
|
FutureResponse |
asyncRequest(Object command,
ResponseCallback responseCallback)
An asynchronous request response where the Receipt will be returned in the future. |
|
void |
connectionInterruptProcessingComplete(ConnectionId connectionId)
|
|
void |
disposeTransport(Transport transport)
|
|
int |
getBackupPoolSize()
|
|
Transport |
getConnectedTransport()
|
|
URI |
getConnectedTransportURI()
|
|
int |
getConnectFailures()
|
|
int |
getCurrentBackups()
|
|
long |
getInitialReconnectDelay()
|
|
int |
getMaxCacheSize()
|
|
int |
getMaxReconnectAttempts()
|
|
long |
getMaxReconnectDelay()
|
|
int |
getReceiveCounter()
Returns a counter which gets incremented as data is read from the transport. |
|
long |
getReconnectDelay()
|
|
double |
getReconnectDelayExponent()
|
|
String |
getRemoteAddress()
|
|
int |
getStartupMaxReconnectAttempts()
|
|
ConnectionStateTracker |
getStateTracker()
|
|
long |
getTimeout()
|
|
TransportListener |
getTransportListener()
Returns the current transport listener |
|
String |
getUpdateURIsURL()
|
|
void |
handleConnectionControl(ConnectionControl control)
|
|
void |
handleTransportFailure(IOException e)
|
|
boolean |
isBackup()
|
|
boolean |
isConnected()
|
|
boolean |
isDisposed()
|
|
boolean |
isFaultTolerant()
Indicates if the transport can handle faults |
|
protected boolean |
isPriority(URI uri)
|
|
boolean |
isPriorityBackup()
|
|
boolean |
isRandomize()
|
|
boolean |
isRebalanceUpdateURIs()
|
|
boolean |
isReconnectSupported()
|
|
boolean |
isTrackMessages()
|
|
boolean |
isTrackTransactionProducers()
|
|
boolean |
isUpdateURIsSupported()
|
|
boolean |
isUseExponentialBackOff()
|
|
|
narrow(Class<T> target)
|
|
void |
oneway(Object o)
A one way asynchronous send |
|
void |
reconnect(boolean rebalance)
|
|
void |
reconnect(URI uri)
reconnect to another location |
|
void |
remove(boolean rebalance,
URI[] u)
|
|
Object |
request(Object command)
A synchronous request response |
|
Object |
request(Object command,
int timeout)
A synchronous request response |
|
protected void |
restoreTransport(Transport t)
|
|
void |
setBackup(boolean backup)
|
|
void |
setBackupPoolSize(int backupPoolSize)
|
|
void |
setInitialReconnectDelay(long initialReconnectDelay)
|
|
void |
setMaxCacheSize(int maxCacheSize)
|
|
void |
setMaxReconnectAttempts(int maxReconnectAttempts)
|
|
void |
setMaxReconnectDelay(long maxReconnectDelay)
|
|
void |
setNestedExtraQueryOptions(String nestedExtraQueryOptions)
|
|
void |
setPriorityBackup(boolean priorityBackup)
|
|
void |
setPriorityURIs(String priorityURIs)
|
|
void |
setRandomize(boolean randomize)
|
|
void |
setRebalanceUpdateURIs(boolean rebalanceUpdateURIs)
|
|
void |
setReconnectDelay(long reconnectDelay)
|
|
void |
setReconnectDelayExponent(double reconnectDelayExponent)
|
|
void |
setReconnectSupported(boolean value)
|
|
void |
setStartupMaxReconnectAttempts(int startupMaxReconnectAttempts)
|
|
void |
setTimeout(long timeout)
|
|
void |
setTrackMessages(boolean trackMessages)
|
|
void |
setTrackTransactionProducers(boolean trackTransactionProducers)
|
|
void |
setTransportListener(TransportListener commandListener)
Registers an inbound command listener |
|
void |
setUpdateURIsSupported(boolean value)
|
|
void |
setUpdateURIsURL(String updateURIsURL)
|
|
void |
setUseExponentialBackOff(boolean useExponentialBackOff)
|
|
void |
start()
|
|
void |
stop()
|
|
String |
toString()
|
|
void |
updateURIs(boolean rebalance,
URI[] updatedURIs)
Provide a list of available alternative locations |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public FailoverTransport()
throws InterruptedIOException
InterruptedIOException| Method Detail |
|---|
public final void disposeTransport(Transport transport)
public final void handleTransportFailure(IOException e)
throws InterruptedException
InterruptedExceptionpublic final void handleConnectionControl(ConnectionControl control)
public void start()
throws Exception
start in interface ServiceException
public void stop()
throws Exception
stop in interface ServiceExceptionpublic long getInitialReconnectDelay()
public void setInitialReconnectDelay(long initialReconnectDelay)
public long getMaxReconnectDelay()
public void setMaxReconnectDelay(long maxReconnectDelay)
public long getReconnectDelay()
public void setReconnectDelay(long reconnectDelay)
public double getReconnectDelayExponent()
public void setReconnectDelayExponent(double reconnectDelayExponent)
public Transport getConnectedTransport()
public URI getConnectedTransportURI()
public int getMaxReconnectAttempts()
public void setMaxReconnectAttempts(int maxReconnectAttempts)
public int getStartupMaxReconnectAttempts()
public void setStartupMaxReconnectAttempts(int startupMaxReconnectAttempts)
public long getTimeout()
public void setTimeout(long timeout)
public boolean isRandomize()
public void setRandomize(boolean randomize)
randomize - The randomize to set.public boolean isBackup()
public void setBackup(boolean backup)
public int getBackupPoolSize()
public void setBackupPoolSize(int backupPoolSize)
public int getCurrentBackups()
public boolean isTrackMessages()
public void setTrackMessages(boolean trackMessages)
public boolean isTrackTransactionProducers()
public void setTrackTransactionProducers(boolean trackTransactionProducers)
public int getMaxCacheSize()
public void setMaxCacheSize(int maxCacheSize)
public boolean isPriorityBackup()
public void setPriorityBackup(boolean priorityBackup)
public void setPriorityURIs(String priorityURIs)
public void oneway(Object o)
throws IOException
Transport
oneway in interface TransportIOException
public FutureResponse asyncRequest(Object command,
ResponseCallback responseCallback)
throws IOException
Transport
asyncRequest in interface TransportresponseCallback - TODO
IOException
public Object request(Object command)
throws IOException
Transport
request in interface TransportIOException
public Object request(Object command,
int timeout)
throws IOException
Transport
request in interface TransportIOException
public void add(boolean rebalance,
URI[] u)
add in interface CompositeTransport
public void remove(boolean rebalance,
URI[] u)
remove in interface CompositeTransport
public void add(boolean rebalance,
String u)
public void reconnect(boolean rebalance)
public TransportListener getTransportListener()
Transport
getTransportListener in interface Transportpublic void setTransportListener(TransportListener commandListener)
Transport
setTransportListener in interface Transportpublic <T> T narrow(Class<T> target)
narrow in interface Transport
protected void restoreTransport(Transport t)
throws Exception,
IOException
Exception
IOExceptionpublic boolean isUseExponentialBackOff()
public void setUseExponentialBackOff(boolean useExponentialBackOff)
public String toString()
toString in class Objectpublic String getRemoteAddress()
getRemoteAddress in interface Transportpublic boolean isFaultTolerant()
Transport
isFaultTolerant in interface Transportprotected boolean isPriority(URI uri)
public boolean isDisposed()
isDisposed in interface Transportpublic boolean isConnected()
isConnected in interface Transport
public void reconnect(URI uri)
throws IOException
Transport
reconnect in interface TransportIOException - on failure of if not supportedpublic boolean isReconnectSupported()
isReconnectSupported in interface Transportpublic void setReconnectSupported(boolean value)
public boolean isUpdateURIsSupported()
isUpdateURIsSupported in interface Transportpublic void setUpdateURIsSupported(boolean value)
public void updateURIs(boolean rebalance,
URI[] updatedURIs)
throws IOException
Transport
updateURIs in interface TransportIOExceptionpublic String getUpdateURIsURL()
public void setUpdateURIsURL(String updateURIsURL)
updateURIsURL - the updateURIsURL to setpublic boolean isRebalanceUpdateURIs()
public void setRebalanceUpdateURIs(boolean rebalanceUpdateURIs)
rebalanceUpdateURIs - the rebalanceUpdateURIs to setpublic int getReceiveCounter()
Transport
getReceiveCounter in interface Transportpublic int getConnectFailures()
public void connectionInterruptProcessingComplete(ConnectionId connectionId)
public ConnectionStateTracker getStateTracker()
public void setNestedExtraQueryOptions(String nestedExtraQueryOptions)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||