
com.groupbyinc.flux.cluster.NodeConnectionsService.class Maven / Gradle / Ivy
???? 4? 2com/groupbyinc/flux/cluster/NodeConnectionsService ?com/groupbyinc/flux/common/component/AbstractLifecycleComponent NodeConnectionsService.java Dcom/groupbyinc/flux/cluster/NodeConnectionsService$ConnectionChecker ConnectionChecker 4com/groupbyinc/flux/cluster/NodeConnectionsService$1 /com/groupbyinc/flux/threadpool/ThreadPool$Names )com/groupbyinc/flux/threadpool/ThreadPool
Names 4com/groupbyinc/flux/common/settings/Setting$Property +com/groupbyinc/flux/common/settings/Setting Property %java/lang/invoke/MethodHandles$Lookup java/lang/invoke/MethodHandles Lookup 'CLUSTER_NODE_RECONNECT_INTERVAL_SETTING -Lcom/groupbyinc/flux/common/settings/Setting; ZLcom/groupbyinc/flux/common/settings/Setting;
threadPool +Lcom/groupbyinc/flux/threadpool/ThreadPool; transportService 0Lcom/groupbyinc/flux/transport/TransportService; nodes $Ljava/util/concurrent/ConcurrentMap; iLjava/util/concurrent/ConcurrentMap; nodeLocks 6Lcom/groupbyinc/flux/common/util/concurrent/KeyedLock; hLcom/groupbyinc/flux/common/util/concurrent/KeyedLock; reconnectInterval +Lcom/groupbyinc/flux/common/unit/TimeValue; backgroundFuture &Ljava/util/concurrent/ScheduledFuture; )Ljava/util/concurrent/ScheduledFuture<*>; $assertionsDisabled Z ?(Lcom/groupbyinc/flux/common/settings/Settings;Lcom/groupbyinc/flux/threadpool/ThreadPool;Lcom/groupbyinc/flux/transport/TransportService;)V *Lcom/groupbyinc/flux/common/inject/Inject; 1(Lcom/groupbyinc/flux/common/settings/Settings;)V . 1
2 @com/groupbyinc/flux/common/util/concurrent/ConcurrentCollections 4 newConcurrentMap &()Ljava/util/concurrent/ConcurrentMap; 6 7
5 8 ! " : 4com/groupbyinc/flux/common/util/concurrent/KeyedLock < ()V . >
= ? $ % A ) * C E G I get B(Lcom/groupbyinc/flux/common/settings/Settings;)Ljava/lang/Object; K L
M )com/groupbyinc/flux/common/unit/TimeValue O ' ( Q this 4Lcom/groupbyinc/flux/cluster/NodeConnectionsService; settings .Lcom/groupbyinc/flux/common/settings/Settings; connectToNodes 4(Lcom/groupbyinc/flux/cluster/node/DiscoveryNodes;)V java/lang/Throwable Y java/lang/InterruptedException [ #java/util/concurrent/CountDownLatch ] /com/groupbyinc/flux/cluster/node/DiscoveryNodes _ getSize ()I a b
` c (I)V . e
^ f iterator ()Ljava/util/Iterator; h i
` j java/util/Iterator l hasNext ()Z n o m p next ()Ljava/lang/Object; r s m t .com/groupbyinc/flux/cluster/node/DiscoveryNode v acquire A(Ljava/lang/Object;)Lcom/groupbyinc/flux/common/lease/Releasable; x y
= z java/lang/Integer | valueOf (I)Ljava/lang/Integer; ~
} ? "java/util/concurrent/ConcurrentMap ? putIfAbsent 8(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; ? ? ? ? .com/groupbyinc/flux/transport/TransportService ?
nodeConnected 3(Lcom/groupbyinc/flux/cluster/node/DiscoveryNode;)Z ? ?
? ? $closeResource 1(Ljava/lang/Throwable;Ljava/lang/AutoCloseable;)V ? ?
? +com/groupbyinc/flux/common/lease/Releasable ? countDown ? >
^ ?
management ? executor :(Ljava/lang/String;)Ljava/util/concurrent/ExecutorService; ? ?
? ?(Lcom/groupbyinc/flux/cluster/NodeConnectionsService;Lcom/groupbyinc/flux/cluster/node/DiscoveryNode;Ljava/util/concurrent/CountDownLatch;)V . ?
? $java/util/concurrent/ExecutorService ? execute (Ljava/lang/Runnable;)V ? ? ? ? await ? >
^ ? java/lang/Thread ?
currentThread ()Ljava/lang/Thread; ? ?
? ? interrupt ? >
? ? connected ignored -Lcom/groupbyinc/flux/common/lease/Releasable; node 0Lcom/groupbyinc/flux/cluster/node/DiscoveryNode; e Ljava/lang/InterruptedException; discoveryNodes 1Lcom/groupbyinc/flux/cluster/node/DiscoveryNodes; latch %Ljava/util/concurrent/CountDownLatch; disconnectFromNodesExcept java/lang/Exception ? java/util/HashSet ? keySet ()Ljava/util/Set; ? ? ? ? (Ljava/util/Collection;)V . ?
? ?
java/util/Set ? remove (Ljava/lang/Object;)Z ? ? ? ? ? j &(Ljava/lang/Object;)Ljava/lang/Object; ? ? ? ? , - ? java/lang/AssertionError ? java/lang/StringBuilder ?
? ? node ? append -(Ljava/lang/String;)Ljava/lang/StringBuilder; ? ?
? ? -(Ljava/lang/Object;)Ljava/lang/StringBuilder; ? ?
? ? / was removed in event but not in internal nodes ? toString ()Ljava/lang/String; ? ?
? ? (Ljava/lang/Object;)V . ?
? ? disconnectFromNode 3(Lcom/groupbyinc/flux/cluster/node/DiscoveryNode;)V ? ?
? ? logger !Lorg/apache/logging/log4j/Logger; ? ? ? "java/lang/invoke/LambdaMetafactory ? metafactory ?(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite; ? ?
? ? ? ,()Lorg/apache/logging/log4j/message/Message; ? "lambda$disconnectFromNodesExcept$0 \(Lcom/groupbyinc/flux/cluster/node/DiscoveryNode;)Lorg/apache/logging/log4j/message/Message; ? ?
? a(Lcom/groupbyinc/flux/cluster/node/DiscoveryNode;)Lorg/apache/logging/log4j/util/MessageSupplier; K org/apache/logging/log4j/Logger warn G(Lorg/apache/logging/log4j/util/MessageSupplier;Ljava/lang/Throwable;)V Ljava/lang/Exception; current Ljava/lang/Integer; nodesToKeep currentNodes ALjava/util/Set; Ljava/util/Set; validateAndConnectIfNeeded isHeldByCurrentThread ?
= 4validateAndConnectIfNeeded must be called under lock lifecycle 0Lcom/groupbyinc/flux/common/component/Lifecycle; .com/groupbyinc/flux/common/component/Lifecycle stoppedOrClosed o
containsKey! ? ?"
connectToNode$ ?
?% put' ? ?( K ? ?* # didn't have a counter in nodes map, intValue. b
}/ #lambda$validateAndConnectIfNeeded$1 ](Lcom/groupbyinc/flux/cluster/node/DiscoveryNode;I)Lorg/apache/logging/log4j/message/Message;12
34 b(Lcom/groupbyinc/flux/cluster/node/DiscoveryNode;I)Lorg/apache/logging/log4j/util/MessageSupplier; K6 7 finalNodeFailureCount I nodeFailureCount doStart generic= 7(Lcom/groupbyinc/flux/cluster/NodeConnectionsService;)V .?
@ schedule y(Lcom/groupbyinc/flux/common/unit/TimeValue;Ljava/lang/String;Ljava/lang/Runnable;)Ljava/util/concurrent/ScheduledFuture;BC
D doStop 6com/groupbyinc/flux/common/util/concurrent/FutureUtilsG cancel (Ljava/util/concurrent/Future;)ZIJ
HK doClose 5org/apache/logging/log4j/message/ParameterizedMessageN /failed to connect to node {} (tried [{}] times)P 9(Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)V .R
OS !failed to disconnect to node [{}]U '(Ljava/lang/String;Ljava/lang/Object;)V .W
OX java/lang/AutoCloseableZ close\ >[]
addSuppressed (Ljava/lang/Throwable;)V_`
Za x0 Ljava/lang/Throwable; x1 Ljava/lang/AutoCloseable;
access$000 W(Lcom/groupbyinc/flux/cluster/NodeConnectionsService;)Lorg/apache/logging/log4j/Logger;
access$100 l(Lcom/groupbyinc/flux/cluster/NodeConnectionsService;)Lcom/groupbyinc/flux/common/util/concurrent/KeyedLock;
access$200
access$300 Z(Lcom/groupbyinc/flux/cluster/NodeConnectionsService;)Ljava/util/concurrent/ConcurrentMap;
access$400 f(Lcom/groupbyinc/flux/cluster/NodeConnectionsService;)Lcom/groupbyinc/flux/common/component/Lifecycle;
access$502 ?(Lcom/groupbyinc/flux/cluster/NodeConnectionsService;Ljava/util/concurrent/ScheduledFuture;)Ljava/util/concurrent/ScheduledFuture;
access$600 a(Lcom/groupbyinc/flux/cluster/NodeConnectionsService;)Lcom/groupbyinc/flux/common/unit/TimeValue;
access$700 a(Lcom/groupbyinc/flux/cluster/NodeConnectionsService;)Lcom/groupbyinc/flux/threadpool/ThreadPool; java/lang/Classw desiredAssertionStatusy o
xz cluster.nodes.reconnect_interval|
timeValueSeconds .(J)Lcom/groupbyinc/flux/common/unit/TimeValue;??
P? NodeScope 6Lcom/groupbyinc/flux/common/settings/Setting$Property;?? ? positiveTimeSetting ?(Ljava/lang/String;Lcom/groupbyinc/flux/common/unit/TimeValue;[Lcom/groupbyinc/flux/common/settings/Setting$Property;)Lcom/groupbyinc/flux/common/settings/Setting;??
? Signature Code LocalVariableTable LineNumberTable RuntimeVisibleAnnotations
StackMapTable LocalVariableTypeTable BootstrapMethods
SourceFile InnerClasses ! ? ! " ? # $ % ? &