org.talend.esb.servicelocator.cxf.internal
Class RandomSelectionStrategy
java.lang.Object
org.talend.esb.servicelocator.cxf.internal.LocatorSelectionStrategy
org.talend.esb.servicelocator.cxf.internal.RandomSelectionStrategy
- All Implemented Interfaces:
- org.apache.cxf.clustering.FailoverStrategy
public class RandomSelectionStrategy
- extends LocatorSelectionStrategy
Selects randomly from the available endpoints for each call.
If multiple clients use EvenDistributionSelectionStrategy it
could happen that all clients choose subsequently the same endpoints since the locator
instances for each client operate independently. RandomSelectionStrategy avoids this
problem.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RandomSelectionStrategy
public RandomSelectionStrategy()
getRotatedList
protected List<String> getRotatedList(List<String> strings)
setReloadAdressesCount
public void setReloadAdressesCount(int reloadAdressesCount)
getAlternateAddresses
public List<String> getAlternateAddresses(org.apache.cxf.message.Exchange exchange)
getPrimaryAddress
public String getPrimaryAddress(org.apache.cxf.message.Exchange exchange)
- Specified by:
getPrimaryAddress in class LocatorSelectionStrategy
- Returns:
Copyright © 2011–2015 Talend Inc.. All rights reserved.