April 2017
Beginner to intermediate
360 pages
9h 35m
English
This policy adds token awareness on top of another policy. The requests will be routed to the nodes, which contain the token (or the partition). This policy is used when you query over multiple partitions. To use it in conjunction with RoundRobinPolicy.
To use this policy, create a Cluster object, as follows:
Cluster cluster = Cluster.builder().addContactPoints("127.0.0.1").withLoadBalancingPolicy(new TokenAwarePolicy(new RoundRobinPolicy())).build();
Read now
Unlock full access