Package com.atlassian.jira.cluster
Interface ClusterManager
- All Superinterfaces:
ClusterInfo
- All Known Implementing Classes:
DefaultClusterManager
Manages the cluster - addition of nodes, removal, etc
- Since:
- v6.1
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringDeprecated, for removal: This API element is subject to removal in a future version.static final StringDeprecated, for removal: This API element is subject to removal in a future version.UseMessageHandlerService.ANY_NODEinstead -
Method Summary
Modifier and TypeMethodDescriptionvoidEnsures that any local Jira indexes are ready for the start of Jira (for example, issue and shared entity indexes).Returns a snapshot of the live nodes.Returns all the nodes in the cluster.booleanisActive()booleanDeprecated.since 9.14 would always return true.booleanisNodeActive(@NotNull String nodeId) booleanisNodeAlive(@NotNull String nodeId) booleanisNodeOffline(@NotNull String nodeId) booleanisNodePresent(@NotNull String id) moveNodesToOfflineIfOlderThan(@NotNull Duration retentionPeriod) Update nodes's state toNode.NodeState.OFFLINEif current node's state isNode.NodeState.ACTIVEand Not Alive for specified retention periodvoidmoveToOffline(@NotNull String nodeId) Update nodes's state toNode.NodeState.OFFLINEif current state isNode.NodeState.ACTIVEand Not AlivevoidMerges the information from the heartbeat table and the clusternode table to give accurate information of which nodes are alive.voidremoveIfOffline(@NotNull String nodeId) Remove node from cluster if node isNode.NodeState.OFFLINEremoveOfflineNodesIfOlderThan(@NotNull Duration retentionPeriod) Remove node from cluster if node is inNode.NodeState.OFFLINEstate for specified retention periodvoidDeprecated, for removal: This API element is subject to removal in a future version.It's Lucene specific, no longer relevant for OpenSearch.Methods inherited from interface com.atlassian.jira.cluster.ClusterInfo
getNodeId, isClustered
-
Field Details
-
ALL_NODES
Deprecated, for removal: This API element is subject to removal in a future version.UseMessageHandlerService.ALL_NODESinstead- See Also:
-
ANY_NODE
Deprecated, for removal: This API element is subject to removal in a future version.UseMessageHandlerService.ANY_NODEinstead- See Also:
-
-
Method Details
-
checkIndexOnStart
void checkIndexOnStart()Ensures that any local Jira indexes are ready for the start of Jira (for example, issue and shared entity indexes). -
isActive
boolean isActive() -
getAllNodes
Returns all the nodes in the cluster. If not clustered this will return an empty set.- Returns:
- a collection of
Nodes in a cluster
-
getAllNodeStatuses
Set<NodeStatus> getAllNodeStatuses() -
isClusterLicensed
Deprecated.since 9.14 would always return true.Returns whether or not JIRA is licensed for clustered configurations.- Returns:
- whether or not JIRA is licensed for clustered configurations.
- Since:
- 6.3
-
requestCurrentIndexFromNode
Deprecated, for removal: This API element is subject to removal in a future version.It's Lucene specific, no longer relevant for OpenSearch. No replacement.We send a message to the node we wish a copy from.- Parameters:
node- Node to send the message to get an Index Copy from.
-
findLiveNodes
Collection<Node> findLiveNodes()Returns a snapshot of the live nodes. This collection is refreshed in every heartbeat of the server. Or you can force it calling refreshLiveNodes()- Returns:
- the list of nodes that are alive.
-
refreshLiveNodes
void refreshLiveNodes()Merges the information from the heartbeat table and the clusternode table to give accurate information of which nodes are alive.- Since:
- 6.3.4
-
removeIfOffline
Remove node from cluster if node isNode.NodeState.OFFLINE- Throws:
ClusterStateException- if node is not offline- Since:
- v8.1
-
removeOfflineNodesIfOlderThan
Remove node from cluster if node is inNode.NodeState.OFFLINEstate for specified retention period- Since:
- v8.10
-
moveToOffline
Update nodes's state toNode.NodeState.OFFLINEif current state isNode.NodeState.ACTIVEand Not Alive- Throws:
ClusterStateException- if node is alive- Since:
- v8.1
-
moveNodesToOfflineIfOlderThan
Update nodes's state toNode.NodeState.OFFLINEif current node's state isNode.NodeState.ACTIVEand Not Alive for specified retention period- Returns:
- List of nodes that was moved to
Node.NodeState.OFFLINEstate - Since:
- v8.10
-
isNodeAlive
- Returns:
- true if node is alive otherwise return false
- Since:
- v8.1
-
isNodePresent
- Returns:
- true if node is present in cluster otherwise return false
- Since:
- v8.1
-
isNodeOffline
- Returns:
- true if node is
Node.NodeState.OFFLINEotherwise return false - Since:
- v8.1
-
isNodeActive
- Returns:
- true if node is
Node.NodeState.ACTIVEotherwise return false - Since:
- v8.10
-
findActiveAndNotAliveNodes
- Returns:
- list of nodes that are
Node.NodeState.ACTIVEand not aliveisNodeAlive(java.lang.String) - Since:
- v8.10
-
findOfflineNodes
- Returns:
- list of nodes that are
Node.NodeState.OFFLINE - Since:
- v8.10
-
MessageHandlerService.ALL_NODESinstead