Package org.apache.cxf.clustering
Class RetryStrategy
java.lang.Object
org.apache.cxf.clustering.AbstractStaticFailoverStrategy
org.apache.cxf.clustering.SequentialStrategy
org.apache.cxf.clustering.RetryStrategy
- All Implemented Interfaces:
FailoverStrategy
This strategy simply retries the invocation using the same Endpoint (CXF-2036).
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionList<org.apache.cxf.endpoint.Endpoint>getAlternateEndpoints(org.apache.cxf.message.Exchange exchange) Get the alternate endpoints for this invocation.intprotected <T> TgetNextAlternate(List<T> alternates) Get next alternate endpoint.voidsetMaxNumberOfRetries(int maxNumberOfRetries) protected booleanMethods inherited from class org.apache.cxf.clustering.AbstractStaticFailoverStrategy
getAlternateAddresses, getDelayBetweenRetries, getEndpoints, getLogLevel, selectAlternateAddress, selectAlternateEndpoint, setAlternateAddresses, setDelayBetweenRetries
-
Constructor Details
-
RetryStrategy
public RetryStrategy()
-
-
Method Details
-
getAlternateEndpoints
public List<org.apache.cxf.endpoint.Endpoint> getAlternateEndpoints(org.apache.cxf.message.Exchange exchange) Description copied from class:AbstractStaticFailoverStrategyGet the alternate endpoints for this invocation.- Specified by:
getAlternateEndpointsin interfaceFailoverStrategy- Overrides:
getAlternateEndpointsin classAbstractStaticFailoverStrategy- Parameters:
exchange- the current Exchange- Returns:
- a List of alternate endpoints if available
-
getNextAlternate
Description copied from class:SequentialStrategyGet next alternate endpoint.- Overrides:
getNextAlternatein classSequentialStrategy- Parameters:
alternates- non-empty List of alternate endpoints- Returns:
- the next endpoint or
nullin case there are no more alternates
-
stillTheSameAddress
protected boolean stillTheSameAddress() -
setMaxNumberOfRetries
public void setMaxNumberOfRetries(int maxNumberOfRetries) -
getMaxNumberOfRetries
public int getMaxNumberOfRetries()
-