package Ġcom . graph ene . common . store . data . cassandra Ċ Ċ import Ġcom . data st ax . driver . core . policies . D CA ware Round Rob in Policy Ċ import Ġcom . data st ax . driver . core . policies . Latency Aware Policy Ċ import Ġcom . data st ax . driver . core . policies . Load Bal ancing Policy Ċ import Ġcom . data st ax . driver . core . policies . Round Rob in Policy Ċ import Ġcom . data st ax . driver . core . policies . Token Aware Policy Ċ Ċ class ĠCassandra Load Bal ancing Policy Ġ{ ĊĊĠ Ġcompanion Ġobject Ġ{ ĊĠĠĠ Ġinternal Ġconst Ġval Ġtoken Aware Policy Ġ= Ġ" Token Aware Policy " ĊĠĠĠ Ġinternal Ġconst Ġval Ġtoken Dc Aware Round Rob in Policy Ġ= Ġ" Token Dc Aware Round Rob in Policy " ĊĠĠĠ Ġinternal Ġconst Ġval Ġtoken Latency Aware Policy Ġ= Ġ" Token Latency Aware Policy " ĊĊĠĠĠ Ġfun Ġcreate Load Bal ancing Policy ( policy : ĠString ): ĠLoad Bal ancing Policy Ġ{ ĊĠĠĠĠĠ Ġreturn Ġwhen Ġ( policy ) Ġ{ ĊĠĠĠĠĠĠĠ Ġtoken Aware Policy Ġ-> ĠToken Aware Policy ( Round Rob in Policy ()) ĊĠĠĠĠĠĠĠ Ġtoken Dc Aware Round Rob in Policy Ġ-> ĠToken Aware Policy ( D CA ware Round Rob in Policy . builder (). build ()) ĊĠĠĠĠĠĠĠ Ġtoken Latency Aware Policy Ġ-> ĠToken Aware Policy ( Latency Aware Policy . builder ( Round Rob in Policy ()). build ()) ĊĠĠĠĠĠĠĠ Ġelse Ġ-> Ġthrow ĠIllegalArgumentException ( ĊĠĠĠĠĠĠĠĠĠ Ġ" C assandra Ġload Ġbal ancing Ġpolicy Ġcan Ġbe Ġ$ token Aware Policy Ġ, Ġ" Ġ+ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ"$ token Latency Aware Policy Ġ, Ġ$ token Dc Aware Round Rob in Policy " ĊĠĠĠĠĠĠĠ Ġ) ĊĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĠ Ġ} Ċ } Ċ