Package com.databend.jdbc
Class DatabendNodes
java.lang.Object
com.databend.jdbc.DatabendNodes
- All Implemented Interfaces:
DatabendNodeRouter
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected longprotected final AtomicIntegerprotected final AtomicReference<Long>protected DatabendClientLoadBalancingPolicy -
Constructor Summary
ConstructorsConstructorDescriptionDatabendNodes(List<URI> queryNodesUris, DatabendClientLoadBalancingPolicy policy, String UriPath, String UriQuery, String UriFragment, long discoveryInterval) -
Method Summary
Modifier and TypeMethodDescriptionvoiddiscoverUris(okhttp3.OkHttpClient client, com.databend.client.ClientSettings settings) Discover all possible query uris through databend discovery api and update candidate node router list in needGet load balancing policygetUris()Gets a copy of all possible query urisbooleanvoidsetDiscoveryInterval(long discoveryInterval) voidtoString()voidupdateNodes(List<URI> query_nodes_uris) void
-
Field Details
-
index
-
lastDiscoveryTime
-
discoveryInterval
protected long discoveryInterval -
policy
-
-
Constructor Details
-
DatabendNodes
-
-
Method Details
-
getUris
Description copied from interface:DatabendNodeRouterGets a copy of all possible query uris- Specified by:
getUrisin interfaceDatabendNodeRouter- Returns:
- non-null uris
-
setSSL
-
setDiscoveryInterval
public void setDiscoveryInterval(long discoveryInterval) -
updateNodes
-
updatePolicy
-
getPolicy
Description copied from interface:DatabendNodeRouterGet load balancing policy- Specified by:
getPolicyin interfaceDatabendNodeRouter
-
discoverUris
public void discoverUris(okhttp3.OkHttpClient client, com.databend.client.ClientSettings settings) throws UnsupportedOperationException Description copied from interface:DatabendNodeRouterDiscover all possible query uris through databend discovery api and update candidate node router list in need- Specified by:
discoverUrisin interfaceDatabendNodeRouter- Throws:
UnsupportedOperationException
-
needDiscovery
public boolean needDiscovery()- Specified by:
needDiscoveryin interfaceDatabendNodeRouter
-
parseURI
- Throws:
RuntimeException
-
pickUri
-
toString
-