|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.jira.cluster.DefaultNodeStateManager
public class DefaultNodeStateManager
Manage the state of the current node.
The activate()
and deactivate()
methods are synchronised
as we should only ever be running one of those methods at a time to avoid
weird race conditions that would be possible if we tried to go from active
to passive and vice-versa at the same time.
Constructor Summary | |
---|---|
DefaultNodeStateManager(OfBizClusterNodeStore ofBizClusterNodeStore,
ClusterNodeProperties clusterNodeProperties,
com.atlassian.scheduler.core.LifecycleAwareSchedulerService schedulerService,
ComponentFactory componentFactory,
TaskManager taskManager,
com.atlassian.mail.queue.MailQueue mailQueue,
com.atlassian.event.api.EventPublisher eventPublisher,
TransactionSupport transactionSupport,
JiraSystemRestarter jiraSystemRestarter,
com.atlassian.cache.CacheManager cacheManager)
|
Method Summary | |
---|---|
void |
activate()
Activate the node. |
void |
clearCache(ClearCacheEvent event)
|
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()
There are times when you want the server to go into a deep sleep mode, such as when an import is taking place on the cluster. |
void |
restart()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultNodeStateManager(OfBizClusterNodeStore ofBizClusterNodeStore, ClusterNodeProperties clusterNodeProperties, com.atlassian.scheduler.core.LifecycleAwareSchedulerService schedulerService, ComponentFactory componentFactory, TaskManager taskManager, com.atlassian.mail.queue.MailQueue mailQueue, com.atlassian.event.api.EventPublisher eventPublisher, TransactionSupport transactionSupport, JiraSystemRestarter jiraSystemRestarter, com.atlassian.cache.CacheManager cacheManager)
Method Detail |
---|
@EventListener public void clearCache(ClearCacheEvent event)
public Node getNode()
NodeStateManager
getNode
in interface NodeStateManager
Node.isClustered()
to see if it's part of a clusterpublic Node getNodeWithRefresh()
NodeStateManager
getNodeWithRefresh
in interface NodeStateManager
Node.isClustered()
to see if it's part of a clusterpublic Set<Node> getAllNodes()
NodeStateManager
getAllNodes
in interface NodeStateManager
Node
s in a clusterpublic void activate() throws ClusterStateException
NodeStateManager
activate
in interface NodeStateManager
ClusterStateException
- when we can't become active as requestedpublic void quiesce() throws NotClusteredException
quiesce
in interface NodeStateManager
NotClusteredException
public void restart()
restart
in interface NodeStateManager
public void deactivate() throws NotClusteredException
NodeStateManager
deactivate
in interface NodeStateManager
NotClusteredException
- if the instance is not clustered
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |