org.objectweb.jonas.management.cluster
Class LogicalCluster
java.lang.Object
org.objectweb.jonas.management.cluster.BaseCluster
org.objectweb.jonas.management.cluster.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 doamin.
- Author:
- Adriana Danes, Philippe Durieux
Field Summary |
protected java.lang.String |
type
The type of Cluster, that is part of the MBean ObjectName |
Fields inherited from class org.objectweb.jonas.management.cluster.BaseCluster |
cf, dm, 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 |
Method Summary |
boolean |
addServer(java.lang.String serverName,
ServerProxy proxy)
Add a Server to the list
Make link between the member and the ServerProxy. |
ClusterMember |
createClusterMember(java.lang.String svname,
ServerProxy proxy)
Create a new ClusterMember. |
java.lang.String |
getType()
|
void |
removeServer(java.lang.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.objectweb.jonas.management.cluster.BaseCluster |
addMember, addServer, addServer, deployModule, getMembers, getName, getNbMembers, getObjectName, getServer, getServerProxy, getServerProxyList, getState, 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.objectweb.jonas.management.cluster.BaseClusterMBean |
addServer, addServer, deployModule, getMembers, getName, getNbMembers, getState, startit, stopit, undeployModule, uploadDeployModule, uploadFile |
type
protected java.lang.String type
- The type of Cluster, that is part of the MBean ObjectName
LogicalCluster
public LogicalCluster(ClusterFactory cf)
throws javax.management.JMException
- logical cluster constructor
- Parameters:
cf
- ClusterFactory
- Throws:
javax.management.JMException
- could not create MBean instance
createClusterMember
public ClusterMember createClusterMember(java.lang.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 java.lang.String getType()
- Specified by:
getType
in class BaseCluster
- Returns:
- The String type to be put in the ObjectName
addServer
public boolean addServer(java.lang.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(java.lang.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