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
public class RetryStrategy extends SequentialStrategy
This strategy simply retries the invocation using the same Endpoint (CXF-2036).
-
-
Constructor Summary
Constructors Constructor Description RetryStrategy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<Endpoint>getAlternateEndpoints(Exchange exchange)Get the alternate endpoints for this invocation.intgetMaxNumberOfRetries()protected <T> TgetNextAlternate(List<T> alternates)Get next alternate endpoint.voidsetMaxNumberOfRetries(int maxNumberOfRetries)protected booleanstillTheSameAddress()-
Methods inherited from class org.apache.cxf.clustering.AbstractStaticFailoverStrategy
getAlternateAddresses, getDelayBetweenRetries, getEndpoints, getLogLevel, selectAlternateAddress, selectAlternateEndpoint, setAlternateAddresses, setDelayBetweenRetries
-
-
-
-
Method Detail
-
getAlternateEndpoints
public List<Endpoint> getAlternateEndpoints(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
protected <T> T getNextAlternate(List<T> alternates)
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()
-
-