Package org.apache.cxf.clustering
Class RandomStrategy
- java.lang.Object
-
- org.apache.cxf.clustering.AbstractStaticFailoverStrategy
-
- org.apache.cxf.clustering.RandomStrategy
-
- All Implemented Interfaces:
FailoverStrategy
public class RandomStrategy extends AbstractStaticFailoverStrategy
Failover strategy based on a randomized walk through the static cluster represented by multiple endpoints associated with the same service instance.
-
-
Constructor Summary
Constructors Constructor Description RandomStrategy()Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected <T> TgetNextAlternate(List<T> alternates)Get next alternate endpoint.-
Methods inherited from class org.apache.cxf.clustering.AbstractStaticFailoverStrategy
getAlternateAddresses, getAlternateEndpoints, getDelayBetweenRetries, getEndpoints, getLogLevel, selectAlternateAddress, selectAlternateEndpoint, setAlternateAddresses, setDelayBetweenRetries
-
-
-
-
Method Detail
-
getNextAlternate
protected <T> T getNextAlternate(List<T> alternates)
Get next alternate endpoint.- Specified by:
getNextAlternatein classAbstractStaticFailoverStrategy- Parameters:
alternates- non-empty List of alternate endpoints- Returns:
-
-