public class DefaultNodeStateService extends Object implements NodeStateService
Constructor and Description |
---|
DefaultNodeStateService(GlobalPermissionManager globalPermissionManager,
I18nHelper i18nHelper,
NodeStateManager nodeStateManager) |
Modifier and Type | Method and Description |
---|---|
ServiceResult |
activate(ApplicationUser user)
Activate the current node, provided the user has the necessary permissions.
|
ServiceResult |
deactivate(ApplicationUser user)
Deactivate the node.
|
boolean |
isActive()
Indicates whether the current node is active within the cluster.
|
public DefaultNodeStateService(GlobalPermissionManager globalPermissionManager, I18nHelper i18nHelper, NodeStateManager nodeStateManager)
public ServiceResult activate(ApplicationUser user)
NodeStateService
This method will block until the node becomes active.
activate
in interface NodeStateService
user
- the user performing the activation (required)public ServiceResult deactivate(ApplicationUser user)
NodeStateService
This method will block until the node becomes inactive (passive).
deactivate
in interface NodeStateService
user
- the user performing the deactivation (required)public boolean isActive()
NodeStateService
isActive
in interface NodeStateService
Copyright © 2002-2019 Atlassian. All Rights Reserved.