com.evolveum.midpoint.task.quartzimpl.cluster
Class ClusterManager

java.lang.Object
  extended by com.evolveum.midpoint.task.quartzimpl.cluster.ClusterManager

public class ClusterManager
extends Object

Responsible for keeping the cluster consistent. (Clusterwide task management operations are in ExecutionManager.)

Author:
Pavol Mederly

Constructor Summary
ClusterManager(TaskManagerQuartzImpl taskManager)
           
 
Method Summary
 void checkClusterConfiguration(OperationResult result)
          Verifies cluster consistency (currently checks whether there is no other node with the same ID, and whether clustered/non-clustered nodes are OK).
 void checkSystemConfigurationChanged(OperationResult parentResult)
          Check whether system configuration has not changed in repository (e.g.
 void createNodeObject(OperationResult result)
           
 void deleteNode(String nodeIdentifier, OperationResult result)
           
 String dumpNodeInfo(Node nodeInfo)
           
 List<PrismObject<NodeType>> getAllNodes(OperationResult result)
           
 PrismObject<NodeType> getNodeById(String nodeIdentifier, OperationResult result)
           
 String getNodeId()
           
 PrismObject<NodeType> getNodePrism()
           
 boolean isClusterManagerThreadActive()
           
 boolean isCurrentNode(PrismObject<NodeType> node)
           
 boolean isCurrentNode(String node)
           
 boolean isUp(NodeType nodeType)
           
 void recordNodeShutdown(OperationResult result)
           
 void startClusterManagerThread()
           
 void stopClusterManagerThread(long waitTime, OperationResult parentResult)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClusterManager

public ClusterManager(TaskManagerQuartzImpl taskManager)
Method Detail

checkClusterConfiguration

public void checkClusterConfiguration(OperationResult result)
Verifies cluster consistency (currently checks whether there is no other node with the same ID, and whether clustered/non-clustered nodes are OK).

Parameters:
result -

isClusterManagerThreadActive

public boolean isClusterManagerThreadActive()

recordNodeShutdown

public void recordNodeShutdown(OperationResult result)

getNodeId

public String getNodeId()

isCurrentNode

public boolean isCurrentNode(PrismObject<NodeType> node)

isCurrentNode

public boolean isCurrentNode(String node)

deleteNode

public void deleteNode(String nodeIdentifier,
                       OperationResult result)

createNodeObject

public void createNodeObject(OperationResult result)
                      throws TaskManagerInitializationException
Throws:
TaskManagerInitializationException

getNodePrism

public PrismObject<NodeType> getNodePrism()

isUp

public boolean isUp(NodeType nodeType)

stopClusterManagerThread

public void stopClusterManagerThread(long waitTime,
                                     OperationResult parentResult)

startClusterManagerThread

public void startClusterManagerThread()

dumpNodeInfo

public String dumpNodeInfo(Node nodeInfo)

getAllNodes

public List<PrismObject<NodeType>> getAllNodes(OperationResult result)

getNodeById

public PrismObject<NodeType> getNodeById(String nodeIdentifier,
                                         OperationResult result)
                                  throws ObjectNotFoundException
Throws:
ObjectNotFoundException

checkSystemConfigurationChanged

public void checkSystemConfigurationChanged(OperationResult parentResult)
Check whether system configuration has not changed in repository (e.g. by another node in cluster). Applies new configuration if so.

Parameters:
parentResult -


Copyright © 2013 evolveum. All Rights Reserved.