com.groupbyinc.flux.client.transport.TransportClientNodesService.class Maven / Gradle / Ivy
???? 4 @com/groupbyinc/flux/client/transport/TransportClientNodesService 6com/groupbyinc/flux/common/component/AbstractComponent java/io/Closeable TransportClientNodesService.java Ucom/groupbyinc/flux/client/transport/TransportClientNodesService$NodeListenerCallback NodeListenerCallback Rcom/groupbyinc/flux/client/transport/TransportClientNodesService$SniffNodesSampler SniffNodesSampler Rcom/groupbyinc/flux/client/transport/TransportClientNodesService$SimpleNodeSampler SimpleNodeSampler Ucom/groupbyinc/flux/client/transport/TransportClientNodesService$ScheduledNodeSampler ScheduledNodeSampler Lcom/groupbyinc/flux/client/transport/TransportClientNodesService$NodeSampler NodeSampler Ncom/groupbyinc/flux/client/transport/TransportClientNodesService$RetryListener
RetryListener Hcom/groupbyinc/flux/client/transport/TransportClient$HostFailureListener 4com/groupbyinc/flux/client/transport/TransportClient HostFailureListener 7com/groupbyinc/flux/transport/ConnectionProfile$Builder /com/groupbyinc/flux/transport/ConnectionProfile ! Builder /com/groupbyinc/flux/threadpool/ThreadPool$Names $ )com/groupbyinc/flux/threadpool/ThreadPool & Names :com/groupbyinc/flux/transport/TransportRequestOptions$Type ) 5com/groupbyinc/flux/transport/TransportRequestOptions + Type nodesSamplerInterval +Lcom/groupbyinc/flux/common/unit/TimeValue; pingTimeout J clusterName )Lcom/groupbyinc/flux/cluster/ClusterName; transportService 0Lcom/groupbyinc/flux/transport/TransportService;
threadPool +Lcom/groupbyinc/flux/threadpool/ThreadPool; minCompatibilityVersion Lcom/groupbyinc/flux/Version; listedNodes Ljava/util/List; BLjava/util/List; mutex Ljava/lang/Object; nodes
filteredNodes tempNodeIdGenerator +Ljava/util/concurrent/atomic/AtomicInteger; nodesSampler NLcom/groupbyinc/flux/client/transport/TransportClientNodesService$NodeSampler; nodesSamplerFuture &Ljava/util/concurrent/ScheduledFuture; randomNodeGenerator ignoreClusterName Z closed hostFailureListener JLcom/groupbyinc/flux/client/transport/TransportClient$HostFailureListener; LISTED_NODES_PROFILE 1Lcom/groupbyinc/flux/transport/ConnectionProfile; ?(Lcom/groupbyinc/flux/common/settings/Settings;Lcom/groupbyinc/flux/transport/TransportService;Lcom/groupbyinc/flux/threadpool/ThreadPool;Lcom/groupbyinc/flux/client/transport/TransportClient$HostFailureListener;)V 1(Lcom/groupbyinc/flux/common/settings/Settings;)V O Q
R java/util/Collections T emptyList ()Ljava/util/List; V W
U X : ; Z java/lang/Object \ ()V O ^
] _ = > a ? ; c @ ; e )java/util/concurrent/atomic/AtomicInteger g
h _ A B j %com/groupbyinc/flux/common/Randomness l get ()Ljava/util/Random; n o
m p java/util/Random r nextInt ()I t u
s v (I)V O x
h y G B { 'com/groupbyinc/flux/cluster/ClusterName } CLUSTER_NAME_SETTING -Lcom/groupbyinc/flux/common/settings/Setting; ? ~ ? +com/groupbyinc/flux/common/settings/Setting ? B(Lcom/groupbyinc/flux/common/settings/Settings;)Ljava/lang/Object; n ?
? ? 2 3 ? 4 5 ? 6 7 ? com/groupbyinc/flux/Version ? CURRENT ? 9 ? ? minimumCompatibilityVersion ()Lcom/groupbyinc/flux/Version; ? ?
? ? 8 9 ? 'CLIENT_TRANSPORT_NODES_SAMPLER_INTERVAL ? ? ? settings .Lcom/groupbyinc/flux/common/settings/Settings; ? ? ? )com/groupbyinc/flux/common/unit/TimeValue ? . / ? CLIENT_TRANSPORT_PING_TIMEOUT ? ? ? millis ()J ? ?
? ? 0 1 ? $CLIENT_TRANSPORT_IGNORE_CLUSTER_NAME ? ? ? java/lang/Boolean ? booleanValue ()Z ? ?
? ? H I ? logger 8Lcom/groupbyinc/flux/common/apache/logging/log4j/Logger; ? ? ? 6com/groupbyinc/flux/common/apache/logging/log4j/Logger ? isDebugEnabled ? ? ? ? node_sampler_interval[{}] ? debug '(Ljava/lang/String;Ljava/lang/Object;)V ? ? ? ? ,com/groupbyinc/flux/common/settings/Settings ? .com/groupbyinc/flux/transport/TransportService ? CLIENT_TRANSPORT_SNIFF ? ? ? E(Lcom/groupbyinc/flux/client/transport/TransportClientNodesService;)V O ?
? C D ?
? K L ? generic ?
? schedule y(Lcom/groupbyinc/flux/common/unit/TimeValue;Ljava/lang/String;Ljava/lang/Runnable;)Ljava/util/concurrent/ScheduledFuture; ? ?
' ? E F ? this BLcom/groupbyinc/flux/client/transport/TransportClientNodesService; transportAddresses java/util/ArrayList ?
? _ java/util/List ? iterator ()Ljava/util/Iterator; ? ? ? ? java/util/Iterator ? hasNext ? ? ? ? next ()Ljava/lang/Object; ? ? ? ? .com/groupbyinc/flux/cluster/node/DiscoveryNode ?
getAddress 9()Lcom/groupbyinc/flux/common/transport/TransportAddress; ? ?
? ? add (Ljava/lang/Object;)Z ? ? ? ? unmodifiableList "(Ljava/util/List;)Ljava/util/List; ? ?
U
listedNode 0Lcom/groupbyinc/flux/cluster/node/DiscoveryNode;
lstBuilder ILjava/util/List; connectedNodes addTransportAddresses |([Lcom/groupbyinc/flux/common/transport/TransportAddress;)Lcom/groupbyinc/flux/client/transport/TransportClientNodesService; J I java/lang/IllegalStateException 0transport client is closed, can't add an address
(Ljava/lang/String;)V O
? y 8[Lcom/groupbyinc/flux/common/transport/TransportAddress; 5com/groupbyinc/flux/common/transport/TransportAddress equals ?
2address [{}] already exists with [{}], ignoring... 9(Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)V ? ? isEmpty ? ? (Ljava/util/Collection;)V O"
?# java/lang/StringBuilder%
&