- Type Parameters:
CL -
- All Implemented Interfaces:
- ConnectionPool<CL>, SimpleHostConnectionPool.Listener<CL>
public class TokenAwareConnectionPoolImpl<CL>
extends AbstractHostPartitionConnectionPool<CL>
Connection pool that partitions connections by the hosts which own the token
being operated on. When a token is not available or an operation is known to
span multiple tokens (such as a batch mutate or an index query) host pools
are picked using round robin.
This implementation takes an optimistic approach which is optimized for a
well functioning ring with all nodes up and keeps downed hosts in the
internal data structures.