public class BalancingIpRoutePlanner extends AbstractRoutePlanner
failingAddresses, ipBlock| Constructor and Description |
|---|
BalancingIpRoutePlanner(java.util.List<IpBlock> ipBlocks) |
BalancingIpRoutePlanner(java.util.List<IpBlock> ipBlocks,
java.util.function.Predicate<java.net.InetAddress> ipFilter) |
BalancingIpRoutePlanner(java.util.List<IpBlock> ipBlocks,
java.util.function.Predicate<java.net.InetAddress> ipFilter,
boolean handleSearchFailure) |
| Modifier and Type | Method and Description |
|---|---|
protected Tuple<java.net.InetAddress,java.net.InetAddress> |
determineAddressPair(Tuple<java.net.Inet4Address,java.net.Inet6Address> remoteAddresses)
Determines the local and remote address pair to use
|
determineRoute, freeAddress, freeAllAddresses, getFailingAddresses, getFailingIpsCacheDuration, getIpBlock, getLastAddress, isValidAddress, markAddressFailing, onAddressFailure, shouldHandleSearchFailurepublic BalancingIpRoutePlanner(java.util.List<IpBlock> ipBlocks)
ipBlocks - the block to perform balancing over.public BalancingIpRoutePlanner(java.util.List<IpBlock> ipBlocks, java.util.function.Predicate<java.net.InetAddress> ipFilter)
ipBlocks - the block to perform balancing over.ipFilter - function to filter out certain IP addresses picked from the IP block, causing another random to be chosen.public BalancingIpRoutePlanner(java.util.List<IpBlock> ipBlocks, java.util.function.Predicate<java.net.InetAddress> ipFilter, boolean handleSearchFailure)
ipBlocks - the block to perform balancing over.ipFilter - function to filter out certain IP addresses picked from the IP block, causing another random to be chosen.handleSearchFailure - whether a search 429 should trigger the ip as failingprotected Tuple<java.net.InetAddress,java.net.InetAddress> determineAddressPair(Tuple<java.net.Inet4Address,java.net.Inet6Address> remoteAddresses) throws org.apache.http.HttpException
AbstractRoutePlannerdetermineAddressPair in class AbstractRoutePlannerremoteAddresses - The remote address pair containing IPv4 and IPv6 addresses - which can be nullTuple which contains l = localAddress & r = remoteAddressorg.apache.http.HttpException - when no route can be determined