public interface

NodeStateManager

com.atlassian.jira.cluster.NodeStateManager
Known Indirect Subclasses

Class Overview

Manage the state of nodes in the HA Cluster.

Summary

Public Methods
void activate()
Activate the node.
void deactivate()
Deactivate the node.
Set<Node> getAllNodes()
Returns all the known nodes JIRA node.
Node getNode()
Returns the current JIRA node.
Node getNodeWithRefresh()
Returns the current JIRA node, first refreshing its state from the database.
void quiesce()
void restart()

Public Methods

public void activate ()

Activate the node. This method will block until the node becomes active.

Throws
ClusterStateException when we can't become active as requested

public void deactivate ()

Deactivate the node. This method will block until the node becomes inactive (passive).

Throws
NotClusteredException if the instance is not clustered

public Set<Node> getAllNodes ()

Returns all the known nodes JIRA node. If not clustered this will return an empty set.

Returns
  • a collection of Nodes in a cluster

public Node getNode ()

Returns the current JIRA node.

Returns
  • a non-null instance; call isClustered() to see if it's part of a cluster

public Node getNodeWithRefresh ()

Returns the current JIRA node, first refreshing its state from the database.

Returns
  • a non-null instance; call isClustered() to see if it's part of a cluster

public void quiesce ()

public void restart ()