org.ow2.jonas.lib.management.domain.cluster.logical
Class LogicalCluster
java.lang.Object
org.ow2.jonas.lib.management.domain.cluster.BaseCluster
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
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 |
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 |
type
protected String type
- The type of Cluster, that is part of the MBean ObjectName
LogicalCluster
public LogicalCluster(ClusterFactory cf)
throws JMException
- logical cluster constructor
- Parameters:
cf
- ClusterFactory
- Throws:
JMException
- could not create MBean instance
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 serverproxy
- 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.