|
||||||||||
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
Management Bean for an HA-Singleton service.
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 | |
---|---|
HASingletonSupport()
|
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()
|
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, getDistributedState, getPartitionName, sendNotification, 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()
isMasterNode
in interface HASingletonMBean
public void startSingleton()
Extending classes should override this method and implement the custom singleton logic. Only one node in the cluster is the active master. If the current node is elected for master, this method is invoked. When another node is elected for master for some reason, the stopSingleton() method is invokded.
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);
protected void makeThisNodeMaster()
public void _stopOldMaster()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |