public class LeastConnectedLoadBalancingStrategy extends Object implements LoadBalancingStrategy
Constructor and Description |
---|
LeastConnectedLoadBalancingStrategy(com.graphdbapi.driver.internal.spi.ConnectionPool connectionPool,
com.graphdbapi.driver.v1.Logging logging) |
Modifier and Type | Method and Description |
---|---|
com.graphdbapi.driver.internal.BoltServerAddress |
select(com.graphdbapi.driver.internal.BoltServerAddress[] knownServers,
com.graphdbapi.driver.internal.cluster.StrategyParam params)
在给定的地址数组中选择最合适的地址。
|
public LeastConnectedLoadBalancingStrategy(com.graphdbapi.driver.internal.spi.ConnectionPool connectionPool, com.graphdbapi.driver.v1.Logging logging)
connectionPool
- 连接池logging
- Logger实例访问者public com.graphdbapi.driver.internal.BoltServerAddress select(com.graphdbapi.driver.internal.BoltServerAddress[] knownServers, com.graphdbapi.driver.internal.cluster.StrategyParam params)
LoadBalancingStrategy
select
in interface LoadBalancingStrategy
knownServers
- 已知路由表中的地址数组params
- 自定义策略所需要的属性,例如执行语句中的方法名、图INDEX、执行的参数Copyright © 2024. All rights reserved.