com.atlassian.jira.cluster
Class DefaultNodeStateService

java.lang.Object
  extended by com.atlassian.jira.cluster.DefaultNodeStateService
All Implemented Interfaces:
NodeStateService

public class DefaultNodeStateService
extends Object
implements NodeStateService

The NodeStateService implementation.

Since:
6.1

Constructor Summary
DefaultNodeStateService(GlobalPermissionManager globalPermissionManager, I18nHelper i18nHelper, NodeStateManager nodeStateManager)
           
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultNodeStateService

public DefaultNodeStateService(GlobalPermissionManager globalPermissionManager,
                               I18nHelper i18nHelper,
                               NodeStateManager nodeStateManager)
Method Detail

activate

public ServiceResult activate(ApplicationUser user)
Description copied from interface: NodeStateService
Activate the current node, provided the user has the necessary permissions. This method will block until the node becomes active.

Specified by:
activate in interface NodeStateService
Parameters:
user - the user performing the activation (required)
Returns:
a non-null result

deactivate

public ServiceResult deactivate(ApplicationUser user)
Description copied from interface: NodeStateService
Deactivate the node. This method will block until the node becomes inactive (passive).

Specified by:
deactivate in interface NodeStateService
Parameters:
user - the user performing the deactivation (required)
Returns:
a non-null result

isActive

public boolean isActive()
Description copied from interface: NodeStateService
Indicates whether the current node is active within the cluster.

Specified by:
isActive in interface NodeStateService
Returns:
true if not clustered


Copyright © 2002-2014 Atlassian. All Rights Reserved.