public class

OfBizClusterNodeStore

extends Object
java.lang.Object
   ↳ com.atlassian.jira.cluster.OfBizClusterNodeStore

Class Overview

Responsible for storing and retrieving ClusterNode state in the underlying database

Summary

Public Constructors
OfBizClusterNodeStore(OfBizDelegator ofBizDelegator)
Public Methods
Node createNode(String nodeId, Node.NodeState state, String ip, Long cacheListenerPort)
Creates the node in the underlying database.
int deleteNode(Node node)
Deletes the node from the underlying database.
List<Node> findNodes(EntityCondition condition, List<String> orderBy)
List<Node> getAllNodes()
@Nullable Node getNode(String nodeId)
Node updateNode(String nodeId, Node.NodeState state, String ip, Long cacheListenerPort)
Stores the node in the underlying database.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public OfBizClusterNodeStore (OfBizDelegator ofBizDelegator)

Public Methods

public Node createNode (String nodeId, Node.NodeState state, String ip, Long cacheListenerPort)

Creates the node in the underlying database.

Parameters
nodeId - the node id to create and store in the underlying table
state - the desired node state
cacheListenerPort the multicast port the server is going to use to listen for changes
Returns
  • the newly created node
Throws
DataAccessException if a database error prevents the node from being created

public int deleteNode (Node node)

Deletes the node from the underlying database.

Parameters
node the node to delete
Returns
  • the number of rows deleted

public List<Node> findNodes (EntityCondition condition, List<String> orderBy)

public List<Node> getAllNodes ()

@Nullable public Node getNode (String nodeId)

public Node updateNode (String nodeId, Node.NodeState state, String ip, Long cacheListenerPort)

Stores the node in the underlying database.

Parameters
nodeId - the node id to store in the underlying table
state - the desired node state
cacheListenerPort the multicast port the server is going to use to listen for changes
Returns
  • the newly created node
Throws
DataAccessException if a database error prevents the node from being updated