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.
@Deprecated Set<Node> getAllNodes()
This method is deprecated. since 7.0.6 Use all() instead.
@Deprecated Node getNode()
This method is deprecated. since 7.0.6 Use current() instead.
@Deprecated Node getNodeWithRefresh()
This method is deprecated. since 7.0.6 Use reset() followed by current() instead.
void quiesce()
void restart()
void shutdownNode()
Shutdowns the node in the db.

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

@Deprecated public Set<Node> getAllNodes ()

This method is deprecated.
since 7.0.6 Use all() instead.

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

Returns
  • a collection of Nodes in a cluster

@Deprecated public Node getNode ()

This method is deprecated.
since 7.0.6 Use current() instead.

Returns the current JIRA node.

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

@Deprecated public Node getNodeWithRefresh ()

This method is deprecated.
since 7.0.6 Use reset() followed by current() instead.

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 ()

public void shutdownNode ()

Shutdowns the node in the db. The state of the node should be OFFLINE This will prevent the health checks to show abnormal behaviour in the cluster