Class PluginClusterAwareService


  • @Internal
    public class PluginClusterAwareService
    extends Object
    Provide cluster-aware functionalities for plugins.
    Since:
    9.5
    • Method Detail

      • handleInstallPluginRequest

        public void handleInstallPluginRequest​(@NotNull
                                               @NotNull String pluginKey,
                                               int pluginsVersion,
                                               @Nullable
                                               @Nullable String pluginName)
        Handle a InstallPlugin request received from another node from the same cluster.
        Parameters:
        pluginKey - - the plugin key
        pluginsVersion - - the version of the plugin
        pluginName - - the name of the plugin
        Since:
        9.5
      • handleUninstallPluginRequest

        public void handleUninstallPluginRequest​(@NotNull
                                                 @NotNull String pluginKey,
                                                 int pluginsVersion,
                                                 @Nullable
                                                 @Nullable String pluginName)
        Handle a UninstallPlugin request received from another node from the same cluster.
        Parameters:
        pluginKey - - the plugin key
        pluginsVersion - - the version of the plugin
        pluginName - - the name of the plugin
        Since:
        9.5
      • handleEnablePluginRequest

        public void handleEnablePluginRequest​(@NotNull
                                              @NotNull String pluginKey,
                                              int pluginsVersion,
                                              @Nullable
                                              @Nullable String pluginName)
        Handle a EnablePlugin request received from another node from the same cluster.
        Parameters:
        pluginKey - - the plugin key
        pluginsVersion - - the version of the plugin
        pluginName - - the name of the plugin
        Since:
        9.5
      • handleDisablePluginRequest

        public void handleDisablePluginRequest​(@NotNull
                                               @NotNull String pluginKey,
                                               int pluginsVersion,
                                               @Nullable
                                               @Nullable String pluginName)
        Handle a DisablePlugin request received from another node from the same cluster.
        Parameters:
        pluginKey - - the plugin key
        pluginsVersion - - the version of the plugin
        pluginName - - the name of the plugin
        Since:
        9.5
      • handleUpgradePluginRequest

        public void handleUpgradePluginRequest​(@NotNull
                                               @NotNull String pluginKey,
                                               int pluginsVersion,
                                               @Nullable
                                               @Nullable String pluginName)
        Handle an UpgradePlugin request received from another node from the same cluster.
        Parameters:
        pluginKey - - the plugin key
        pluginsVersion - - the version of the plugin
        pluginName - - the name of the plugin
        Since:
        9.5
      • onPromotedToPrimary

        public void onPromotedToPrimary()
        Update plugin system to reflect the promotion to primary node.

        All plugin operations in the primary node are propagated to all nodes in the cluster. Therefore, the plugin systems from all nodes should be perfectly in sync. Nevertheless, there might be exceptional situations that led to an inconsistent state. So, a complete scan is realized to make sure all plugins are installed and enabled.

        remark: this method was named as a listener-like one to reflect that it should only be executed under this specific situation.

        Since:
        9.5