@Test public void testBuilderWithChildPolicyAsNull() { LoadBalancingPolicy childPolicy = null; assertThatExceptionOfType(IllegalArgumentException.class) .isThrownBy(() -> DataCenterAwarePolicy.builder() .withChildPolicy(childPolicy) .withLocalDc(myLocalDc) .build()); }
public static Builder builder() { return new Builder(); }
DataCenterAwarePolicy implements ChainableLoadBalancingPolicy { public static Builder builder() { return new Builder(); } }
DataCenterAwarePolicy implements ChainableLoadBalancingPolicy { public static Builder builder() { return new Builder(); } DataCenterAwarePolicy(String localDc, LoadBalancingPolicy childPolicy); }
DataCenterAwarePolicy implements ChainableLoadBalancingPolicy { public static Builder builder() { return new Builder(); } DataCenterAwarePolicy(String localDc, LoadBalancingPolicy childPolicy); static Builder builder(); @Override LoadBalancingPolicy getChildPolicy(); @Override void init(Cluster cluster, Collection<Host> hosts); @Override HostDistance distance(Host host); HostDistance distance(Host host, String dataCenter); @Override Iterator<Host> newQueryPlan(final String loggedKeyspace, final Statement statement); @Override void onUp(Host host); @Override void onDown(Host host); @Override void onAdd(Host host); @Override void onRemove(Host host); @Override void close(); }
DataCenterAwarePolicy implements ChainableLoadBalancingPolicy { public static Builder builder() { return new Builder(); } DataCenterAwarePolicy(String localDc, LoadBalancingPolicy childPolicy); static Builder builder(); @Override LoadBalancingPolicy getChildPolicy(); @Override void init(Cluster cluster, Collection<Host> hosts); @Override HostDistance distance(Host host); HostDistance distance(Host host, String dataCenter); @Override Iterator<Host> newQueryPlan(final String loggedKeyspace, final Statement statement); @Override void onUp(Host host); @Override void onDown(Host host); @Override void onAdd(Host host); @Override void onRemove(Host host); @Override void close();  }