org.ow2.jonas.lib.management.domain.cluster.logical
Class LogicalCluster

java.lang.Object
  extended by org.ow2.jonas.lib.management.domain.cluster.BaseCluster
      extended by org.ow2.jonas.lib.management.domain.cluster.logical.LogicalCluster
All Implemented Interfaces:
BaseClusterMBean

public class LogicalCluster
extends BaseCluster
implements BaseClusterMBean

Logical Cluster: may be created by jonasAdmin, or declared in domain.xml A default logical cluster is created for each domain, it holds all the servers in the domain.

Author:
Adriana Danes, Philippe Durieux

Nested Class Summary
 
Nested classes/interfaces inherited from class org.ow2.jonas.lib.management.domain.cluster.BaseCluster
BaseCluster.DeployThread
 
Field Summary
protected  String type
          The type of Cluster, that is part of the MBean ObjectName
 
Fields inherited from class org.ow2.jonas.lib.management.domain.cluster.BaseCluster
cf, dm, domainName, jmx, logger, members, name, objectName, state, STATE_DOWN, STATE_FAILED, STATE_INIT, STATE_PARTIALLY_DOWN, STATE_PARTIALLY_FAILED, STATE_PARTIALLY_UP, STATE_UNKNOWN, STATE_UP
 
Constructor Summary
LogicalCluster(ClusterFactory cf)
          logical cluster constructor
 
Method Summary
 boolean addServer(String serverName, ServerProxy proxy)
          Add a Server to the list.
 ClusterMember createClusterMember(String svname, ServerProxy proxy)
          Create a new ClusterMember.
 String getType()
           
 void removeServer(String svname)
          MBean operation which overides the BaseCluster's one It removes the corresponding member object from the members list and unregisters the corresponding ServerProxy MBean if this is the domain cluster.
 
Methods inherited from class org.ow2.jonas.lib.management.domain.cluster.BaseCluster
addMember, addServer, addServer, deployModule, getMembers, getName, getNbMembers, getObjectName, getRunningServerProxy, getServerProxy, getServerProxyList, getState, isMember, setName, startit, stopit, undeployModule, uploadDeployModule, uploadFile
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.ow2.jonas.lib.management.domain.cluster.BaseClusterMBean
addServer, addServer, deployModule, getMembers, getName, getNbMembers, getState, startit, stopit, undeployModule, uploadDeployModule, uploadFile
 

Field Detail

type

protected String type
The type of Cluster, that is part of the MBean ObjectName

Constructor Detail

LogicalCluster

public LogicalCluster(ClusterFactory cf)
               throws JMException
logical cluster constructor

Parameters:
cf - ClusterFactory
Throws:
JMException - could not create MBean instance
Method Detail

createClusterMember

public ClusterMember createClusterMember(String svname,
                                         ServerProxy proxy)
Description copied from class: BaseCluster
Create a new ClusterMember. Depends on the underlaying class.

Specified by:
createClusterMember in class BaseCluster

getType

public String getType()
Specified by:
getType in class BaseCluster
Returns:
The String type to be put in the ObjectName

addServer

public boolean addServer(String serverName,
                         ServerProxy proxy)
Add a Server to the list. Make link between the member and the ServerProxy.

Parameters:
serverName - name of the managed server
proxy - The ServerProxy related object.
Returns:
True if correctly added in the List.

removeServer

public void removeServer(String svname)
MBean operation which overides the BaseCluster's one It removes the corresponding member object from the members list and unregisters the corresponding ServerProxy MBean if this is the domain cluster. Note that the ClusterMember MBean is not unregistered (it will be done in case of the re-register of a new member in case the server is re-added to the domain). Remove a server from the cluster (jonasAdmin)

Specified by:
removeServer in interface BaseClusterMBean
Overrides:
removeServer in class BaseCluster
Parameters:
svname - logical name of the server


Copyright © 2010 OW2 Consortium. All Rights Reserved.