
com.groupbyinc.flux.action.ingest.IngestActionForwarder.class Maven / Gradle / Ivy
???? 4 ? 7com/groupbyinc/flux/action/ingest/IngestActionForwarder java/lang/Object /com/groupbyinc/flux/cluster/ClusterStateApplier IngestActionForwarder.java %java/lang/invoke/MethodHandles$Lookup java/lang/invoke/MethodHandles
Lookup transportService 0Lcom/groupbyinc/flux/transport/TransportService; ingestNodeGenerator +Ljava/util/concurrent/atomic/AtomicInteger; ingestNodes 1[Lcom/groupbyinc/flux/cluster/node/DiscoveryNode; 3(Lcom/groupbyinc/flux/transport/TransportService;)V ()V
)java/util/concurrent/atomic/AtomicInteger %com/groupbyinc/flux/common/Randomness get ()Ljava/util/Random;
java/util/Random nextInt ()I " #
! $ (I)V &
' )
+ .com/groupbyinc/flux/cluster/node/DiscoveryNode - / this 9Lcom/groupbyinc/flux/action/ingest/IngestActionForwarder; forwardIngestRequest {(Lcom/groupbyinc/flux/action/Action;Lcom/groupbyinc/flux/action/ActionRequest;Lcom/groupbyinc/flux/action/ActionListener;)V randomIngestNode 2()Lcom/groupbyinc/flux/cluster/node/DiscoveryNode; 5 6
7 !com/groupbyinc/flux/action/Action 9 name ()Ljava/lang/String; ; <
: = 8com/groupbyinc/flux/action/ActionListenerResponseHandler ? java/util/Objects A requireNonNull &(Ljava/lang/Object;)Ljava/lang/Object; C D
B E "java/lang/invoke/LambdaMetafactory G 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; I J
H K L ()Ljava/lang/Object; N (com/groupbyinc/flux/action/GenericAction P newResponse -()Lcom/groupbyinc/flux/action/ActionResponse; R S
Q T U B(Lcom/groupbyinc/flux/action/Action;)Ljava/util/function/Supplier; W X K(Lcom/groupbyinc/flux/action/ActionListener;Ljava/util/function/Supplier;)V Z
@ [ .com/groupbyinc/flux/transport/TransportService ] sendRequest ?(Lcom/groupbyinc/flux/cluster/node/DiscoveryNode;Ljava/lang/String;Lcom/groupbyinc/flux/transport/TransportRequest;Lcom/groupbyinc/flux/transport/TransportResponseHandler;)V _ `
^ a action (Lcom/groupbyinc/flux/action/Action<***>; #Lcom/groupbyinc/flux/action/Action; request *Lcom/groupbyinc/flux/action/ActionRequest; listener .Lcom/groupbyinc/flux/action/ActionListener<*>; +Lcom/groupbyinc/flux/action/ActionListener; java/lang/IllegalStateException k WThere are no ingest nodes in this cluster, unable to forward request to an ingest node. m (Ljava/lang/String;)V o
l p incrementAndGet s #
t java/lang/Math v floorMod (II)I x y
w z nodes applyClusterState 4(Lcom/groupbyinc/flux/cluster/ClusterChangedEvent;)V /com/groupbyinc/flux/cluster/ClusterChangedEvent state ,()Lcom/groupbyinc/flux/cluster/ClusterState; ? ?
? ? (com/groupbyinc/flux/cluster/ClusterState ? getNodes 3()Lcom/groupbyinc/flux/cluster/node/DiscoveryNodes; ? ?
? ? /com/groupbyinc/flux/cluster/node/DiscoveryNodes ? getIngestNodes 7()Lcom/groupbyinc/flux/common/collect/ImmutableOpenMap; ? ?
? ? 3com/groupbyinc/flux/common/collect/ImmutableOpenMap ? values @()Lcom/groupbyinc/flux/common/carrotsearch/hppc/ObjectContainer; ? ?
? ?