|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.mx.util.JBossNotificationBroadcasterSupport
org.jboss.system.ServiceMBeanSupport
org.jboss.ha.framework.server.util.TopologyMonitorService
public class TopologyMonitorService
A cluster parition membership monitor. It can be used to view how
the nodes in a cluster are seeing the topology change using either email or
a centralized log server.
To use this to send email on change notifications use the following log4j.xml
fragments:
param: removed ArrayListof nodes that were removed param: added ArrayList of nodes that were added param: members ArrayList of nodes currently in the cluster param: logLoggerName the log4j category name used by the TopologyMonitorService. This should be used for logging to integrate with the TopologyMonitorService output. public void membershipChanged(ArrayList deadMembers, ArrayList newMembers, ArrayList allMembers, String logLoggerName)
Nested Class Summary | |
---|---|
static class |
TopologyMonitorService.AddressPort
|
Field Summary |
---|
Fields inherited from class org.jboss.system.ServiceMBeanSupport |
---|
log, server, SERVICE_CONTROLLER_SIG, serviceName |
Fields inherited from interface org.jboss.system.ServiceMBean |
---|
CREATE_EVENT, CREATED, DESTROY_EVENT, DESTROYED, FAILED, REGISTERED, START_EVENT, STARTED, STARTING, states, STOP_EVENT, STOPPED, STOPPING, UNREGISTERED |
Constructor Summary | |
---|---|
TopologyMonitorService()
|
Method Summary | |
---|---|
Vector |
getClusterNodes()
Get the current cluster parition membership info |
String |
getPartitionName()
Get the name of the cluster partition the mbean is monitoring |
ObjectName |
getTriggerServiceName()
Get the trigger mbean to notify on cluster membership changes |
void |
membershipChanged(Vector deadMembers,
Vector newMembers,
Vector allMembers)
Called when a new partition topology occurs. |
void |
setPartition(org.jboss.ha.framework.interfaces.HAPartition partition)
Set the cluster partition the mbean is monitoring |
void |
setPartitionName(String name)
Set the cluster parition name the mbean is monitoring |
void |
setTriggerServiceName(ObjectName triggerServiceName)
Set the trigger mbean to notify on cluster membership changes |
protected void |
startService()
|
protected void |
stopService()
|
Methods inherited from class org.jboss.mx.util.JBossNotificationBroadcasterSupport |
---|
addNotificationListener, getNotificationInfo, handleNotification, nextNotificationSequenceNumber, removeNotificationListener, removeNotificationListener, sendNotification |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.jboss.system.ServiceMBean |
---|
getName, getState, getStateString, jbossInternalLifecycle |
Methods inherited from interface org.jboss.system.Service |
---|
create, destroy, start, stop |
Constructor Detail |
---|
public TopologyMonitorService()
Method Detail |
---|
protected void startService() throws Exception
startService
in class ServiceMBeanSupport
Exception
protected void stopService() throws Exception
stopService
in class ServiceMBeanSupport
Exception
public String getPartitionName()
TopologyMonitorServiceMBean
getPartitionName
in interface TopologyMonitorServiceMBean
public void setPartitionName(String name)
TopologyMonitorServiceMBean
setPartitionName
in interface TopologyMonitorServiceMBean
public void setPartition(org.jboss.ha.framework.interfaces.HAPartition partition)
TopologyMonitorServiceMBean
setPartition
in interface TopologyMonitorServiceMBean
public ObjectName getTriggerServiceName()
TopologyMonitorServiceMBean
getTriggerServiceName
in interface TopologyMonitorServiceMBean
public void setTriggerServiceName(ObjectName triggerServiceName)
TopologyMonitorServiceMBean
setTriggerServiceName
in interface TopologyMonitorServiceMBean
public Vector getClusterNodes()
TopologyMonitorServiceMBean
getClusterNodes
in interface TopologyMonitorServiceMBean
public void membershipChanged(Vector deadMembers, Vector newMembers, Vector allMembers)
membershipChanged
in interface org.jboss.ha.framework.interfaces.HAPartition.HAMembershipListener
deadMembers
- A list of nodes that have died since the previous viewnewMembers
- A list of nodes that have joined the partition since
the previous viewallMembers
- A list of nodes that built the current view
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |