Class PluginClusterAwareService
- java.lang.Object
-
- com.atlassian.bamboo.plugin.cluster.PluginClusterAwareService
-
@Internal public class PluginClusterAwareService extends Object
Provide cluster-aware functionalities for plugins.- Since:
- 9.5
-
-
Constructor Summary
Constructors Constructor Description PluginClusterAwareService(@NotNull BambooPluginManager pluginManager, PluginClusterAwareEventListener pluginClusterAwareEventListener)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
handleDisablePluginRequest(@NotNull String pluginKey, int pluginsVersion, @Nullable String pluginName)
Handle a DisablePlugin request received from another node from the same cluster.void
handleEnablePluginRequest(@NotNull String pluginKey, int pluginsVersion, @Nullable String pluginName)
Handle a EnablePlugin request received from another node from the same cluster.void
handleInstallPluginRequest(@NotNull String pluginKey, int pluginsVersion, @Nullable String pluginName)
Handle a InstallPlugin request received from another node from the same cluster.void
handleUninstallPluginRequest(@NotNull String pluginKey, int pluginsVersion, @Nullable String pluginName)
Handle a UninstallPlugin request received from another node from the same cluster.void
handleUpgradePluginRequest(@NotNull String pluginKey, int pluginsVersion, @Nullable String pluginName)
Handle an UpgradePlugin request received from another node from the same cluster.void
onPromotedToPrimary()
Update plugin system to reflect the promotion to primary node.
-
-
-
Constructor Detail
-
PluginClusterAwareService
@Inject public PluginClusterAwareService(@NotNull @NotNull BambooPluginManager pluginManager, PluginClusterAwareEventListener pluginClusterAwareEventListener)
-
-
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 keypluginsVersion
- - the version of the pluginpluginName
- - 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 keypluginsVersion
- - the version of the pluginpluginName
- - 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 keypluginsVersion
- - the version of the pluginpluginName
- - 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 keypluginsVersion
- - the version of the pluginpluginName
- - 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 keypluginsVersion
- - the version of the pluginpluginName
- - 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
-
-