public class FixedServerLoadBalancingStrategy extends Object implements LoadBalancingStrategy
Constructor and Description |
---|
FixedServerLoadBalancingStrategy(String ip) |
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 FixedServerLoadBalancingStrategy(String ip) throws UnknownHostException
ip
- 指定的ip地址(格式: 127.0.0.1:7687)UnknownHostException
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.