Java Doc for HASingletonSupport.java in  » EJB-Server-JBoss-4.2.1 » cluster » org » jboss » ha » singleton » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » EJB Server JBoss 4.2.1 » cluster » org.jboss.ha.singleton 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.jboss.ha.jmx.HAServiceMBeanSupport
   org.jboss.ha.singleton.HASingletonSupport

All known Subclasses:   org.jboss.ha.singleton.HASingletonController,
HASingletonSupport
public class HASingletonSupport extends HAServiceMBeanSupport implements HASingletonSupportMBean,HASingleton(Code)
Base class for HA-Singleton services.
author:
   Ivelin Ivanov
author:
   Scott Stark
author:
   Dimitris Andreadis
version:
   $Revision: 61770 $



Constructor Summary
public  HASingletonSupport()
    

Method Summary
public  void_stopOldMaster()
    
public  HASingletonElectionPolicygetElectionPolicy()
    
public  booleangetRestartOnMerge()
     Gets whether this singleton will stop and restart itself if it is the master and a cluster merge occurs.
public  booleanisMasterNode()
    
protected  voidmakeThisNodeMaster()
    
public  voidpartitionTopologyChanged(List newReplicants, int newViewID)
     When topology changes, a new master is elected based on the result of the isDRMMasterReplica() call.
protected  voidrestartMaster()
    
public  voidsetElectionPolicy(HASingletonElectionPolicy mb)
    
public  voidsetRestartOnMerge(boolean restartOnMerge)
     Sets whether this singleton will stop and restart itself if it is the master and a cluster merge occurs?

A restart allows the service to reset any state that may have gotten out-of-sync with the rest of the cluster while the just-merged split was in effect.

protected  voidstartNewMaster()
    
public  voidstartSingleton()
     Extending classes should override this method and implement the custom singleton logic.
public  voidstopSingleton()
     Extending classes should override this method and implement the custom singleton logic.


Constructor Detail
HASingletonSupport
public HASingletonSupport()(Code)
Default CTOR




Method Detail
_stopOldMaster
public void _stopOldMaster()(Code)
This method will be invoked twice by the local node when it stops as well as by the remote



getElectionPolicy
public HASingletonElectionPolicy getElectionPolicy()(Code)

See Also:   HASingletonSupportMBean.getElectionPolicy



getRestartOnMerge
public boolean getRestartOnMerge()(Code)
Gets whether this singleton will stop and restart itself if it is the master and a cluster merge occurs.

A restart allows the service to reset any state that may have gotten out-of-sync with the rest of the cluster while the just-merged split was in effect. true if a restart will occur, falseotherwise




isMasterNode
public boolean isMasterNode()(Code)
true if this cluster node has the active mbean singleton, false otherwise



makeThisNodeMaster
protected void makeThisNodeMaster()(Code)



partitionTopologyChanged
public void partitionTopologyChanged(List newReplicants, int newViewID)(Code)
When topology changes, a new master is elected based on the result of the isDRMMasterReplica() call.
See Also:   HAServiceMBeanSupport.partitionTopologyChanged(Listint)
See Also:    DistributedReplicantManager#isMasterReplica(String);



restartMaster
protected void restartMaster()(Code)



setElectionPolicy
public void setElectionPolicy(HASingletonElectionPolicy mb)(Code)

See Also:   HASingletonSupportMBean.setElectionPolicy(HASingletonElectionPolicy)



setRestartOnMerge
public void setRestartOnMerge(boolean restartOnMerge)(Code)
Sets whether this singleton will stop and restart itself if it is the master and a cluster merge occurs?

A restart allows the service to reset any state that may have gotten out-of-sync with the rest of the cluster while the just-merged split was in effect.
Parameters:
  restartOnMerge - true if a restart should occur, false otherwise




startNewMaster
protected void startNewMaster()(Code)



startSingleton
public void startSingleton()(Code)
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.
See Also:   HASingleton




stopSingleton
public void stopSingleton()(Code)
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 master and another node is elected for master, this method is invoked.
See Also:   HASingleton



Methods inherited from org.jboss.ha.jmx.HAServiceMBeanSupport
public void _receiveRemoteNotification(Notification notification)(Code)(Java Doc)
protected void callAsyncMethodOnPartition(String methodName, Object[] args, Class[] types) throws Exception(Code)(Java Doc)
public void callMethodOnPartition(String methodName, Object[] args) throws Exception(Code)(Java Doc)
public void callMethodOnPartition(String methodName, Object[] args, Class[] types) throws Exception(Code)(Java Doc)
protected HAPartition findHAPartitionWithName(String name) throws Exception(Code)(Java Doc)
public ClusterPartitionMBean getClusterPartition()(Code)(Java Doc)
public Serializable getDistributedState(String key)(Code)(Java Doc)
public HAPartition getPartition()(Code)(Java Doc)
public String getPartitionName()(Code)(Java Doc)
public boolean getSendLocalLifecycleNotifications()(Code)(Java Doc)
public boolean getSendRemoteLifecycleNotifications()(Code)(Java Doc)
public String getServiceHAName()(Code)(Java Doc)
protected boolean isDRMMasterReplica()(Code)(Java Doc)
public void partitionTopologyChanged(List newReplicants, int newReplicantsViewId)(Code)(Java Doc)
protected void registerDRMListener() throws Exception(Code)(Java Doc)
protected void registerRPCHandler()(Code)(Java Doc)
public void sendNotification(Notification notification)(Code)(Java Doc)
protected void sendNotificationRemote(Notification notification) throws Exception(Code)(Java Doc)
protected void sendNotificationToLocalListeners(Notification notification)(Code)(Java Doc)
public void setClusterPartition(ClusterPartitionMBean clusterPartition)(Code)(Java Doc)
public void setDistributedState(String key, Serializable value) throws Exception(Code)(Java Doc)
public void setPartitionName(String newPartitionName)(Code)(Java Doc)
public void setSendLocalLifecycleNotifications(boolean sendLocalLifecycleNotifications)(Code)(Java Doc)
public void setSendRemoteLifecycleNotifications(boolean sendRemoteLifecycleNotifications)(Code)(Java Doc)
protected void setupPartition() throws Exception(Code)(Java Doc)
protected void startService() throws Exception(Code)(Java Doc)
protected void stopService() throws Exception(Code)(Java Doc)
protected void unregisterDRMListener() throws Exception(Code)(Java Doc)
protected void unregisterRPCHandler()(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.