Class RoundRobinPartitionKey
- java.lang.Object
-
- org.asynchttpclient.netty.channel.RoundRobinPartitionKey
-
public final class RoundRobinPartitionKey extends Object
Channel-pool partition key used byLoadBalance.ROUND_ROBIN.It augments the regular partition key (produced by the configured
ChannelPoolPartitioning) with the resolved IP a request is pinned to, so that pooled HTTP/1.1 connections and multiplexed HTTP/2 connections are kept and reused per IP rather than per host.
-
-
Constructor Summary
Constructors Constructor Description RoundRobinPartitionKey(Object baseKey, InetAddress address)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)ObjectgetBaseKey()inthashCode()StringtoString()RoundRobinPartitionKeywithAddress(InetAddress newAddress)
-
-
-
Constructor Detail
-
RoundRobinPartitionKey
public RoundRobinPartitionKey(Object baseKey, InetAddress address)
-
-
Method Detail
-
getBaseKey
public Object getBaseKey()
- Returns:
- the per-host base partition key (without the pinned IP). Lets the HTTP/2 registry group sibling per-IP connections for the same host so a permit-starved request can reuse one (issue #2214).
-
withAddress
public RoundRobinPartitionKey withAddress(InetAddress newAddress)
- Returns:
- a key with the same base but a different IP, used to re-pin to the IP actually connected to when the connector fails over from the initially selected IP
-
-