com.groupbyinc.flux.client.RestClient.class Maven / Gradle / Ivy
???? 3a %com/groupbyinc/flux/client/RestClient java/lang/Object java/io/Closeable RestClient.java =com/groupbyinc/flux/client/RestClient$DeadNodeIteratorAdapter DeadNodeIteratorAdapter .com/groupbyinc/flux/client/RestClient$DeadNode DeadNode /com/groupbyinc/flux/client/RestClient$NodeTuple NodeTuple 5com/groupbyinc/flux/client/RestClient$FailureListener FailureListener :com/groupbyinc/flux/client/RestClient$SyncResponseListener SyncResponseListener Ecom/groupbyinc/flux/client/RestClient$FailureTrackingResponseListener FailureTrackingResponseListener 'com/groupbyinc/flux/client/RestClient$2 'com/groupbyinc/flux/client/RestClient$1 java/util/Map$Entry
java/util/Map Entry 1com/groupbyinc/flux/client/RequestOptions$Builder # )com/groupbyinc/flux/client/RequestOptions % Builder 5com/groupbyinc/flux/client/DeadHostState$TimeSupplier ( (com/groupbyinc/flux/client/DeadHostState * TimeSupplier logger 7Lcom/groupbyinc/flux/common/apache/commons/logging/Log; client JLcom/groupbyinc/flux/common/http/impl/nio/client/CloseableHttpAsyncClient; defaultHeaders Ljava/util/List; :Ljava/util/List; maxRetryTimeoutMillis J
pathPrefix Ljava/lang/String;
lastNodeIndex +Ljava/util/concurrent/atomic/AtomicInteger; blacklist $Ljava/util/concurrent/ConcurrentMap; zLjava/util/concurrent/ConcurrentMap; failureListener 7Lcom/groupbyinc/flux/client/RestClient$FailureListener; nodeSelector )Lcom/groupbyinc/flux/client/NodeSelector; nodeTuple 1Lcom/groupbyinc/flux/client/RestClient$NodeTuple; fLcom/groupbyinc/flux/client/RestClient$NodeTuple;>; ?(Lcom/groupbyinc/flux/common/http/impl/nio/client/CloseableHttpAsyncClient;J[Lcom/groupbyinc/flux/common/http/Header;Ljava/util/List;Ljava/lang/String;Lcom/groupbyinc/flux/client/RestClient$FailureListener;Lcom/groupbyinc/flux/client/NodeSelector;)V ()V D F
G )java/util/concurrent/atomic/AtomicInteger I (I)V D K
J L 8 9 N &java/util/concurrent/ConcurrentHashMap P
Q G : ; S / 0 U 4 5 W java/util/Arrays Y asList %([Ljava/lang/Object;)Ljava/util/List; [ \
Z ] java/util/Collections _ unmodifiableList "(Ljava/util/List;)Ljava/util/List; a b
` c 1 2 e = > g 6 7 i ? @ k setNodes (Ljava/util/Collection;)V m n
o this 'Lcom/groupbyinc/flux/client/RestClient; )[Lcom/groupbyinc/flux/common/http/Header; nodes 3Ljava/util/List; builder R([Lcom/groupbyinc/flux/client/Node;)Lcom/groupbyinc/flux/client/RestClientBuilder; ,com/groupbyinc/flux/client/RestClientBuilder x "[Lcom/groupbyinc/flux/client/Node; z java/util/List | (Ljava/util/List;)V D ~
y [([Lcom/groupbyinc/flux/common/http/HttpHost;)Lcom/groupbyinc/flux/client/RestClientBuilder; hostsToNodes =([Lcom/groupbyinc/flux/common/http/HttpHost;)Ljava/util/List; ? ?
? hosts +[Lcom/groupbyinc/flux/common/http/HttpHost; setHosts .([Lcom/groupbyinc/flux/common/http/HttpHost;)V Ljava/lang/Deprecated; java/util/Collection ? isEmpty ()Z ? ? ? ? "java/lang/IllegalArgumentException ? nodes must not be null or empty ? (Ljava/lang/String;)V D ?
? ? :com/groupbyinc/flux/common/http/impl/client/BasicAuthCache ?
? G java/util/LinkedHashMap ?
? G iterator ()Ljava/util/Iterator; ? ? ? ? 0com/groupbyinc/flux/common/http/client/AuthCache ? java/util/Iterator ? hasNext ? ? ? ? next ()Ljava/lang/Object; ? ? ? ? com/groupbyinc/flux/client/Node ? node cannot be null ? java/util/Objects ? requireNonNull 8(Ljava/lang/Object;Ljava/lang/String;)Ljava/lang/Object; ? ?
? ? getHost ,()Lcom/groupbyinc/flux/common/http/HttpHost; ? ?
? ? put 8(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; ? ? ! ? 5com/groupbyinc/flux/common/http/impl/auth/BasicScheme ?
? G ^(Lcom/groupbyinc/flux/common/http/HttpHost;Lcom/groupbyinc/flux/common/http/auth/AuthScheme;)V ? ? ? ? java/util/ArrayList ? values ()Ljava/util/Collection; ? ? ! ? D n
? ? G(Ljava/lang/Object;Lcom/groupbyinc/flux/common/http/client/AuthCache;)V D ?
? A B ? "java/util/concurrent/ConcurrentMap ? clear ? F ? ? node !Lcom/groupbyinc/flux/client/Node; 9Ljava/util/Collection; Ljava/util/Collection; authCache 2Lcom/groupbyinc/flux/common/http/client/AuthCache; nodesByHost \Ljava/util/Map; Ljava/util/Map; hosts must not be null nor empty ?
? L ? -(Lcom/groupbyinc/flux/common/http/HttpHost;)V D ?
? ? add (Ljava/lang/Object;)Z ? ? } ? host *Lcom/groupbyinc/flux/common/http/HttpHost; getNodes ()Ljava/util/List; Ljava/lang/Object; t ? ? performRequest K(Lcom/groupbyinc/flux/client/Request;)Lcom/groupbyinc/flux/client/Response; java/io/IOException ? (J)V D ?
? performRequestAsyncNoCatch T(Lcom/groupbyinc/flux/client/Request;Lcom/groupbyinc/flux/client/ResponseListener;)V ? ?
? get '()Lcom/groupbyinc/flux/client/Response; ? ?
? request $Lcom/groupbyinc/flux/client/Request; listener