com.groupbyinc.flux.transport.RemoteClusterConnection$ConnectHandler.class Maven / Gradle / Ivy
???? 4 Dcom/groupbyinc/flux/transport/RemoteClusterConnection$ConnectHandler java/lang/Object java/io/Closeable RemoteClusterConnection.java 5com/groupbyinc/flux/transport/RemoteClusterConnection ConnectHandler ecom/groupbyinc/flux/transport/RemoteClusterConnection$ConnectHandler$SniffClusterStateResponseHandler SniffClusterStateResponseHandler Fcom/groupbyinc/flux/transport/RemoteClusterConnection$ConnectHandler$1 Ncom/groupbyinc/flux/common/util/CancellableThreads$ExecutionCancelledException 2com/groupbyinc/flux/common/util/CancellableThreads ExecutionCancelledException Fcom/groupbyinc/flux/common/util/concurrent/ThreadContext$StoredContext 8com/groupbyinc/flux/common/util/concurrent/ThreadContext
StoredContext Lcom/groupbyinc/flux/transport/TransportService$ContextRestoreResponseHandler .com/groupbyinc/flux/transport/TransportService ContextRestoreResponseHandler 2com/groupbyinc/flux/transport/Transport$Connection 'com/groupbyinc/flux/transport/Transport !
Connection 7com/groupbyinc/flux/transport/RemoteClusterConnection$1 $ /com/groupbyinc/flux/threadpool/ThreadPool$Names & )com/groupbyinc/flux/threadpool/ThreadPool ( Names Bcom/groupbyinc/flux/common/util/CancellableThreads$IOInterruptable + IOInterruptable :com/groupbyinc/flux/transport/TransportRequestOptions$Type . 5com/groupbyinc/flux/transport/TransportRequestOptions 0 Type Dcom/groupbyinc/flux/transport/RemoteClusterConnection$ConnectedNodes 3 ConnectedNodes %java/lang/invoke/MethodHandles$Lookup 6 java/lang/invoke/MethodHandles 8 Lookup running Ljava/util/concurrent/Semaphore; closed +Ljava/util/concurrent/atomic/AtomicBoolean; queue $Ljava/util/concurrent/BlockingQueue; cLjava/util/concurrent/BlockingQueue;>; cancellableThreads 4Lcom/groupbyinc/flux/common/util/CancellableThreads; this$0 7Lcom/groupbyinc/flux/transport/RemoteClusterConnection; :(Lcom/groupbyinc/flux/transport/RemoteClusterConnection;)V D E H ()V F J
K java/util/concurrent/Semaphore M (I)V F O
N P ; < R )java/util/concurrent/atomic/AtomicBoolean T (Z)V F V
U W = > Y 'java/util/concurrent/ArrayBlockingQueue [
\ P ? @ ^
K B C a this FLcom/groupbyinc/flux/transport/RemoteClusterConnection$ConnectHandler; maybeConnect connect .(Lcom/groupbyinc/flux/action/ActionListener;)V f g
h /(Lcom/groupbyinc/flux/action/ActionListener;Z)V f j
k connectListener =Lcom/groupbyinc/flux/action/ActionListener; +Lcom/groupbyinc/flux/action/ActionListener; forceConnect "java/util/concurrent/BlockingQueue q offer (Ljava/lang/Object;)Z s t r u /java/util/concurrent/RejectedExecutionException w connect queue is full y (Ljava/lang/String;)V F {
x | )com/groupbyinc/flux/action/ActionListener ~ onFailure (Ljava/lang/Exception;)V ? ? ? isEmpty ()Z ? ? r ?
tryAcquire ? ?
N ? java/util/ArrayList ?
? K drainTo (Ljava/util/Collection;)I ? ? r ? get ? ?
U ? release ? J
N ? Ecom/groupbyinc/flux/common/apache/lucene/store/AlreadyClosedException ? !connect handler is already closed ?
? | ,(Ljava/lang/Iterable;Ljava/lang/Exception;)V ? ? ? java/util/Collections ? emptyList ()Ljava/util/List; ? ?
? ? java/util/Collection ? java/lang/Throwable ? forkConnect (Ljava/util/Collection;)V ? ?
? toNotify ULjava/util/Collection;>; Ljava/util/Collection;
runConnect Z forceRun
access$200 i(Lcom/groupbyinc/flux/transport/RemoteClusterConnection;)Lcom/groupbyinc/flux/transport/TransportService; ? ?
?
getThreadPool -()Lcom/groupbyinc/flux/threadpool/ThreadPool; ? ?
?
management ? executor :(Ljava/lang/String;)Ljava/util/concurrent/ExecutorService; ? ?
) ? _(Lcom/groupbyinc/flux/transport/RemoteClusterConnection$ConnectHandler;Ljava/util/Collection;)V F ?
? $java/util/concurrent/ExecutorService ? submit 3(Ljava/lang/Runnable;)Ljava/util/concurrent/Future; ? ? ? ?
threadPool +Lcom/groupbyinc/flux/threadpool/ThreadPool; &Ljava/util/concurrent/ExecutorService; collectRemoteNodes r(Ljava/util/Iterator;Lcom/groupbyinc/flux/transport/TransportService;Lcom/groupbyinc/flux/action/ActionListener;)V 7com/groupbyinc/flux/transport/ConnectTransportException ? java/io/IOException ? java/lang/IllegalStateException ? java/lang/Thread ?
currentThread ()Ljava/lang/Thread; ? ?
? ?
isInterrupted ? ?
? ? java/lang/InterruptedException ? %remote connect thread got interrupted ?
? | java/util/Iterator ? hasNext ? ? ? ? "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; ? ?
? ? ? J lambda$collectRemoteNodes$2 ? ?
? ? run ?(Lcom/groupbyinc/flux/transport/RemoteClusterConnection$ConnectHandler;Ljava/util/Iterator;Lcom/groupbyinc/flux/transport/TransportService;Lcom/groupbyinc/flux/action/ActionListener;)Lcom/groupbyinc/flux/common/util/CancellableThreads$IOInterruptable; ? ? ? executeIO G(Lcom/groupbyinc/flux/common/util/CancellableThreads$IOInterruptable;)V ? ?
? no seed node left ?
? | java/lang/Exception
access$600 q(Lcom/groupbyinc/flux/transport/RemoteClusterConnection;)Lcom/groupbyinc/flux/common/apache/logging/log4j/Logger;
()Ljava/lang/Object; lambda$collectRemoteNodes$3
?(Lcom/groupbyinc/flux/transport/RemoteClusterConnection$ConnectHandler;)Lcom/groupbyinc/flux/common/apache/logging/log4j/util/Supplier; ?
6com/groupbyinc/flux/common/apache/logging/log4j/Logger debug W(Lcom/groupbyinc/flux/common/apache/logging/log4j/util/Supplier;Ljava/lang/Throwable;)V ? ?
ex PLcom/groupbyinc/flux/common/util/CancellableThreads$ExecutionCancelledException; Ljava/lang/Exception; seedNodes FLjava/util/Iterator; Ljava/util/Iterator; transportService 0Lcom/groupbyinc/flux/transport/TransportService; listener close
compareAndSet (ZZ)Z!"
U# connect handler is closed% cancel' {
( acquire* J
N+ e J
- interrupt/ J
?0 e Ljava/lang/InterruptedException; isClosed Lcom/groupbyinc/flux/common/apache/logging/log4j/message/ParameterizedMessage5 .fetching nodes from external cluster {} failed7 access$1000 K(Lcom/groupbyinc/flux/transport/RemoteClusterConnection;)Ljava/lang/String;9:
; '(Ljava/lang/String;Ljava/lang/Object;)V F=
6> next@ ?A .com/groupbyinc/flux/cluster/node/DiscoveryNodeC REG