Apache CXF API

org.apache.cxf.clustering
Class RandomStrategy

java.lang.Object
  extended by org.apache.cxf.clustering.AbstractStaticFailoverStrategy
      extended by 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
RandomStrategy()
          Constructor.
 
Method Summary
protected
<T> T
getNextAlternate(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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RandomStrategy

public RandomStrategy()
Constructor.

Method Detail

getNextAlternate

protected <T> T getNextAlternate(List<T> alternates)
Get next alternate endpoint.

Specified by:
getNextAlternate in class AbstractStaticFailoverStrategy
Parameters:
alternates - non-empty List of alternate endpoints
Returns:

Apache CXF API

Apache CXF