Package com.databend.jdbc

# Class DatabendClientLoadBalancingPolicy

java.lang.Object
com.databend.jdbc.DatabendClientLoadBalancingPolicy

public class DatabendClientLoadBalancingPolicy extends Object

## Field Summary

Fields
Modifier and Type
Field
Description
`static final String`
`DISABLED`
Policy that disable load balance and always use the first node.
`static final String`
`RANDOM`
Policy to pick a node randomly from the list of available nodes.
`static final String`
`ROUND_ROBIN`
Policy to pick a node using Round Robin Algorithm

## Constructor Summary

Constructors
Constructor
Description
`DatabendClientLoadBalancingPolicy()`

## Method Summary

Modifier and Type
Method
Description
`protected URI`
`pickUri(String query_id, DatabendNodes nodes)`
Policy to pick a node based on the least loaded algorithm.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### DISABLED

public static final String DISABLED
Policy that disable load balance and always use the first node.

See Also:
  - Constant Field Values

### RANDOM

public static final String RANDOM
Policy to pick a node randomly from the list of available nodes.

See Also:
  - Constant Field Values

### ROUND_ROBIN

public static final String ROUND_ROBIN
Policy to pick a node using Round Robin Algorithm

See Also:
  - Constant Field Values

## Constructor Details

### DatabendClientLoadBalancingPolicy

public DatabendClientLoadBalancingPolicy()

## Method Details

### pickUri

protected URI pickUri(String query_id, DatabendNodes nodes)
Policy to pick a node based on the least loaded algorithm.

Parameters:
  `nodes` - the list of URIs to choose from
Returns:
  the URI to use