
com.groupbyinc.flux.cluster.routing.allocation.command.AllocationCommands.class Maven / Gradle / Ivy
???? 32 Icom/groupbyinc/flux/cluster/routing/allocation/command/AllocationCommands java/lang/Object AllocationCommands.java Pcom/groupbyinc/flux/cluster/routing/allocation/command/AllocationCommand$Factory Hcom/groupbyinc/flux/cluster/routing/allocation/command/AllocationCommand Factory 8com/groupbyinc/flux/common/xcontent/XContentParser$Token 2com/groupbyinc/flux/common/xcontent/XContentParser
Token 5com/groupbyinc/flux/common/xcontent/ToXContent$Params .com/groupbyinc/flux/common/xcontent/ToXContent Params Xcom/groupbyinc/flux/cluster/routing/allocation/command/AllocateAllocationCommand$Factory Pcom/groupbyinc/flux/cluster/routing/allocation/command/AllocateAllocationCommand Vcom/groupbyinc/flux/cluster/routing/allocation/command/CancelAllocationCommand$Factory Ncom/groupbyinc/flux/cluster/routing/allocation/command/CancelAllocationCommand Tcom/groupbyinc/flux/cluster/routing/allocation/command/MoveAllocationCommand$Factory Lcom/groupbyinc/flux/cluster/routing/allocation/command/MoveAllocationCommand factories Ljava/util/Map; uLjava/util/Map; commands Ljava/util/List; \Ljava/util/List; registerFactory g(Ljava/lang/String;Lcom/groupbyinc/flux/cluster/routing/allocation/command/AllocationCommand$Factory;)V ! " )
java/util/Map + put 8(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; - . , / type Ljava/lang/String; factory RLcom/groupbyinc/flux/cluster/routing/allocation/command/AllocationCommand$Factory;
lookupFactory f(Ljava/lang/String;)Lcom/groupbyinc/flux/cluster/routing/allocation/command/AllocationCommand$Factory; %Lcom/groupbyinc/flux/common/Nullable; get &(Ljava/lang/Object;)Ljava/lang/Object; 8 9 , : name lookupFactorySafe "java/lang/IllegalArgumentException > java/lang/StringBuilder @ ()V B C
A D 3No allocation command factory registered for name [ F append -(Ljava/lang/String;)Ljava/lang/StringBuilder; H I
A J ] L toString ()Ljava/lang/String; N O
A P (Ljava/lang/String;)V B R
? S WLcom/groupbyinc/flux/cluster/routing/allocation/command/AllocationCommand$Factory; N([Lcom/groupbyinc/flux/cluster/routing/allocation/command/AllocationCommand;)V
D java/util/ArrayList X
Y D $ % [ java/util/Arrays ] asList %([Ljava/lang/Object;)Ljava/util/List; _ `
^ a java/util/List c addAll (Ljava/util/Collection;)Z e f d g K[Lcom/groupbyinc/flux/cluster/routing/allocation/command/AllocationCommand; i this KLcom/groupbyinc/flux/cluster/routing/allocation/command/AllocationCommands; add ?([Lcom/groupbyinc/flux/cluster/routing/allocation/command/AllocationCommand;)Lcom/groupbyinc/flux/cluster/routing/allocation/command/AllocationCommands; ()Ljava/util/List; execute ?(Lcom/groupbyinc/flux/cluster/routing/allocation/RoutingAllocation;Z)Lcom/groupbyinc/flux/cluster/routing/allocation/RoutingExplanations; Bcom/groupbyinc/flux/cluster/routing/allocation/RoutingExplanations r
s D iterator ()Ljava/util/Iterator; u v d w java/util/Iterator y hasNext ()Z { | z } next ()Ljava/lang/Object; ? z ? ?(Lcom/groupbyinc/flux/cluster/routing/allocation/RoutingAllocation;Z)Lcom/groupbyinc/flux/cluster/routing/allocation/RerouteExplanation; p ? ? ?(Lcom/groupbyinc/flux/cluster/routing/allocation/RerouteExplanation;)Lcom/groupbyinc/flux/cluster/routing/allocation/RoutingExplanations; m ?
s ? command JLcom/groupbyinc/flux/cluster/routing/allocation/command/AllocationCommand;
allocation BLcom/groupbyinc/flux/cluster/routing/allocation/RoutingAllocation; explain Z explanations DLcom/groupbyinc/flux/cluster/routing/allocation/RoutingExplanations; readFrom (Lcom/groupbyinc/flux/common/io/stream/StreamInput;)Lcom/groupbyinc/flux/cluster/routing/allocation/command/AllocationCommands; java/io/IOException ? B V
? 0com/groupbyinc/flux/common/io/stream/StreamInput ? readVInt ()I ? ?
? ?
readString ? O
? ? = 6
? ~(Lcom/groupbyinc/flux/common/io/stream/StreamInput;)Lcom/groupbyinc/flux/cluster/routing/allocation/command/AllocationCommand; ? ? ? m n
? i I in 2Lcom/groupbyinc/flux/common/io/stream/StreamInput; size writeTo ?(Lcom/groupbyinc/flux/cluster/routing/allocation/command/AllocationCommands;Lcom/groupbyinc/flux/common/io/stream/StreamOutput;)V ? ? d ? 1com/groupbyinc/flux/common/io/stream/StreamOutput ? writeVInt (I)V ? ?
? ? <