|
||||||||||
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.jmx.HAServiceMBeanSupport
org.jboss.ha.singleton.HASingletonSupport
public class HASingletonSupport
Base class for HA-Singleton services.
Field Summary |
---|
Fields inherited from class org.jboss.system.ServiceMBeanSupport |
---|
log, server, SERVICE_CONTROLLER_SIG, serviceName |
Fields inherited from interface org.jboss.ha.singleton.HASingletonMBean |
---|
HASINGLETON_STARTED_NOTIFICATION, HASINGLETON_STARTING_NOTIFICATION, HASINGLETON_STOPPED_NOTIFICATION, HASINGLETON_STOPPING_NOTIFICATION |
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 | |
---|---|
HASingletonSupport()
Default CTOR |
Method Summary | |
---|---|
void |
_stopOldMaster()
This method will be invoked twice by the local node when it stops as well as by the remote |
boolean |
isMasterNode()
True if this cluster node has the active mbean singleton, false otherwise |
protected void |
makeThisNodeMaster()
|
void |
partitionTopologyChanged(List newReplicants,
int newViewID)
When topology changes, a new master is elected based on the result of the isDRMMasterReplica() call. |
void |
startSingleton()
Extending classes should override this method and implement the custom singleton logic. |
void |
stopSingleton()
Extending classes should override this method and implement the custom singleton logic. |
Methods inherited from class org.jboss.system.ServiceMBeanSupport |
---|
create, createService, destroy, destroyService, getDeploymentInfo, getLog, getName, getNextNotificationSequenceNumber, getObjectName, getServer, getServiceName, getState, getStateString, jbossInternalCreate, jbossInternalDescription, jbossInternalDestroy, jbossInternalLifecycle, jbossInternalStart, jbossInternalStop, postDeregister, postRegister, preDeregister, preRegister, start, stop |
Methods inherited from class org.jboss.mx.util.JBossNotificationBroadcasterSupport |
---|
addNotificationListener, getNotificationInfo, handleNotification, nextNotificationSequenceNumber, removeNotificationListener, removeNotificationListener |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.jboss.ha.jmx.HAServiceMBean |
---|
callMethodOnPartition, getClusterPartition, getDistributedState, getPartitionName, sendNotification, setClusterPartition, setDistributedState, setPartitionName |
Methods inherited from interface org.jboss.system.ServiceMBean |
---|
getName, getState, getStateString, jbossInternalLifecycle |
Methods inherited from interface org.jboss.system.Service |
---|
create, destroy, start, stop |
Methods inherited from interface javax.management.NotificationBroadcaster |
---|
addNotificationListener, getNotificationInfo, removeNotificationListener |
Constructor Detail |
---|
public HASingletonSupport()
Method Detail |
---|
public boolean isMasterNode()
HASingletonMBean
isMasterNode
in interface HASingletonMBean
public void startSingleton()
When the extending class is a stateful singleton, it will usually use putDistributedState() and getDistributedState() to save in the cluster environment information that will be needed by the next node elected for master should the current master node fail.
startSingleton
in interface HASingleton
HASingleton
public void stopSingleton()
stopSingleton
in interface HASingleton
HASingleton
public void partitionTopologyChanged(List newReplicants, int newViewID)
partitionTopologyChanged
in class HAServiceMBeanSupport
HAServiceMBeanSupport.partitionTopologyChanged(List, int)
,
DistributedReplicantManager#isMasterReplica(String);
public void _stopOldMaster()
protected void makeThisNodeMaster()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |