com.groupbyinc.flux.plugins.PluginsService.class Maven / Gradle / Ivy
???? 4? *com/groupbyinc/flux/plugins/PluginsService 6com/groupbyinc/flux/common/component/AbstractComponent PluginsService.java 1com/groupbyinc/flux/plugins/PluginsService$Bundle Bundle 4com/groupbyinc/flux/common/settings/Settings$Builder ,com/groupbyinc/flux/common/settings/Settings Builder 4com/groupbyinc/flux/common/settings/Setting$Property +com/groupbyinc/flux/common/settings/Setting Property %java/lang/invoke/MethodHandles$Lookup java/lang/invoke/MethodHandles Lookup
configPath Ljava/nio/file/Path; plugins Ljava/util/List; ?Ljava/util/List;>; info FLcom/groupbyinc/flux/action/admin/cluster/node/info/PluginsAndModules; MANDATORY_SETTING -Lcom/groupbyinc/flux/common/settings/Setting; SLcom/groupbyinc/flux/common/settings/Setting;>; $assertionsDisabled Z getPluginSettings ()Ljava/util/List; & java/util/List ( stream ()Ljava/util/stream/Stream; * + ) , "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; 0 1
/ 2 3 &(Ljava/lang/Object;)Ljava/lang/Object; 5 lambda$getPluginSettings$0 E(Lcom/groupbyinc/flux/common/collect/Tuple;)Ljava/util/stream/Stream; 7 8
9 : 8 apply ()Ljava/util/function/Function; = > ? java/util/stream/Stream A flatMap 8(Ljava/util/function/Function;)Ljava/util/stream/Stream; C D B E java/util/stream/Collectors G toList ()Ljava/util/stream/Collector; I J
H K collect 0(Ljava/util/stream/Collector;)Ljava/lang/Object; M N B O this ,Lcom/groupbyinc/flux/plugins/PluginsService; getPluginSettingsFilter lambda$getPluginSettingsFilter$1 T 8
U V ? ?(Lcom/groupbyinc/flux/common/settings/Settings;Ljava/nio/file/Path;Ljava/nio/file/Path;Ljava/nio/file/Path;Ljava/util/Collection;)V java/io/IOException [ 1(Lcom/groupbyinc/flux/common/settings/Settings;)V Y ]
^ ` java/util/ArrayList b ()V Y d
c e java/util/Collection g iterator ()Ljava/util/Iterator; i j h k java/nio/file/Path m java/util/Iterator o hasNext ()Z q r p s next ()Ljava/lang/Object; u v p w java/lang/Class y
loadPlugin y(Ljava/lang/Class;Lcom/groupbyinc/flux/common/settings/Settings;Ljava/nio/file/Path;)Lcom/groupbyinc/flux/plugins/Plugin; { |
} &com/groupbyinc/flux/plugins/PluginInfo getName ()Ljava/lang/String; ? ?
z ? classpath plugin ? NA ? com/groupbyinc/flux/Version ? CURRENT Lcom/groupbyinc/flux/Version; ? ? ? ? 1.8 ? java/util/Collections ? emptyList ? %
? ? ?(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lcom/groupbyinc/flux/Version;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Z)V Y ?
? ? logger !Lorg/apache/logging/log4j/Logger; ? ? ? org/apache/logging/log4j/Logger ? isTraceEnabled ? r ? ? !plugin loaded from classpath [{}] ? trace '(Ljava/lang/String;Ljava/lang/Object;)V ? ? ? ? "com/groupbyinc/flux/plugins/Plugin ? (com/groupbyinc/flux/common/collect/Tuple ? '(Ljava/lang/Object;Ljava/lang/Object;)V Y ?
? ? add (Ljava/lang/Object;)Z ? ? ) ?
? ? java/util/LinkedHashSet ?
? e getModuleBundles %(Ljava/nio/file/Path;)Ljava/util/Set; ? ?
?
java/util/Set ? ? k plugin (Lcom/groupbyinc/flux/plugins/PluginInfo; ? ? ? addAll (Ljava/util/Collection;)Z ? ? ? ? java/lang/IllegalStateException ? Unable to initialize modules ? *(Ljava/lang/String;Ljava/lang/Throwable;)V Y ?
? ? -com/groupbyinc/flux/common/io/FileSystemUtils ? isAccessibleDirectory 8(Ljava/nio/file/Path;Lorg/apache/logging/log4j/Logger;)Z ? ?
? ? checkForFailedPluginRemovals (Ljava/nio/file/Path;)V ? ?
? getPluginBundles ? ?
? Unable to initialize plugins ? loadBundles !(Ljava/util/Set;)Ljava/util/List; ? ?
? ) ? Dcom/groupbyinc/flux/action/admin/cluster/node/info/PluginsAndModules ? #(Ljava/util/List;Ljava/util/List;)V Y ?
? ? ? unmodifiableList "(Ljava/util/List;)Ljava/util/List; ? ?
? ? ? get B(Lcom/groupbyinc/flux/common/settings/Settings;)Ljava/lang/Object; ? ?
? isEmpty ? r ) ? java/util/HashSet ?
? e ) k java/lang/String ? contains ? ? ) ? ? ? ? ? ? ? java/util/Locale ROOT Ljava/util/Locale; 2missing mandatory plugins [%s], found plugins [%s] java/lang/Object , "com/groupbyinc/flux/common/Strings
collectionToDelimitedString :(Ljava/lang/Iterable;Ljava/lang/String;)Ljava/lang/String;
format K(Ljava/util/Locale;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
? (Ljava/lang/String;)V Y
? getModuleInfos %
? module
logPluginInfo F(Ljava/util/List;Ljava/lang/String;Lorg/apache/logging/log4j/Logger;)V
! getPluginInfos# %
?$ ? $Lcom/groupbyinc/flux/plugins/Plugin;
pluginInfo pluginClass 8Ljava/lang/Class<+Lcom/groupbyinc/flux/plugins/Plugin;>; Ljava/lang/Class; bundle 3Lcom/groupbyinc/flux/plugins/PluginsService$Bundle; modules DLjava/util/Set; Ljava/util/Set; ex Ljava/io/IOException; mandatoryPlugin Ljava/lang/String; message missingPlugins #Ljava/util/Set; settings .Lcom/groupbyinc/flux/common/settings/Settings; modulesDirectory pluginsDirectory classpathPlugins PLjava/util/Collection;>; Ljava/util/Collection;
pluginsLoaded pluginsList :Ljava/util/List; pluginsNames $Ljava/util/List; seenBundles modulesList loaded mandatoryPlugins " # H java/lang/AssertionErrorJ
K e java/lang/StringBuilderM
N e no P append -(Ljava/lang/String;)Ljava/lang/StringBuilder;RS
NT s loadedV toStringX ?
NY ?[ ? <(Lcom/groupbyinc/flux/plugins/PluginInfo;)Ljava/lang/String;^ ? mapa D Bb sortedd + Be loaded g [i ]k name pluginInfos type updatedSettings 0()Lcom/groupbyinc/flux/common/settings/Settings; java/util/HashMapr
s e java/util/TreeMapu
v e builder 8()Lcom/groupbyinc/flux/common/settings/Settings$Builder;xy
z
java/util/Map| v2~ v
? additionalSettings?q
?? keySet ()Ljava/util/Set;??
? v1? v
?? put 8(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;??}? "java/lang/IllegalArgumentException? Cannot have additional setting [?
] in plugin [? ], already added in plugin [?
? f(Lcom/groupbyinc/flux/common/settings/Settings;)Lcom/groupbyinc/flux/common/settings/Settings$Builder;??
?
getFeature ()Ljava/util/Optional;??
?? java/util/Optional? isPresent? r
?? ? v
?? containsKey? ?}?