Java Doc for DistributedReplicantManagerImpl.java in  » EJB-Server-JBoss-4.2.1 » cluster » org » jboss » ha » framework » server » 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.framework.server 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.jboss.ha.framework.server.DistributedReplicantManagerImpl

DistributedReplicantManagerImpl
public class DistributedReplicantManagerImpl implements DistributedReplicantManagerImplMBean,HAPartition.HAMembershipExtendedListener,HAPartition.HAPartitionStateTransfer,AsynchEventHandler.AsynchEventProcessor(Code)
This class manages replicated objects.
author:
   Bill Burke.
author:
   Sacha Labourey.
author:
   Scott.stark@jboss.org
version:
   $Revision: 61770 $

Inner Class :static class KeyChangeEvent
Inner Class :protected class MergeMembers extends Thread
Inner Class :protected class MembersPublisher extends Thread

Field Summary
final protected static  StringSERVICE_NAME
    
protected  Class[]add_types
    
protected  AsynchEventHandlerasynchHandler
    
protected  HashMapintraviewIdCache
    
protected  ObjectNamejmxName
    
protected  ConcurrentReaderHashMapkeyListeners
    
protected  ConcurrentReaderHashMaplocalReplicants
    
protected  Loggerlog
    
protected  MBeanServermbeanserver
    
protected  StringnodeName
    
protected  HAPartitionpartition
    
protected  LatchpartitionNameKnown
    
protected  Class[]remove_types
    
protected  ConcurrentReaderHashMapreplicants
    
protected static  intthreadID
    
protected  booleantrace
    

Constructor Summary
public  DistributedReplicantManagerImpl(HAPartition partition, MBeanServer server)
    

Method Summary
public  void_add(String key, String nodeName, Serializable replicant)
    
public  void_remove(String key, String nodeName)
    
public  voidadd(String key, Serializable replicant)
    
protected  voidaddReplicant(String key, String nodeName, Serializable replicant)
     Add a replicant to the replicants map.
protected  voidaddReplicant(Map map, String key, String nodeName, Serializable replicant)
     Logic for adding replicant to any map.
protected  intcalculateReplicantsHash(List members)
    
protected  voidcleanupKeyListeners()
    
public  voiddestroy()
    
public  CollectiongetAllServices()
    
public  SerializablegetCurrentState()
    
protected  VectorgetKeysReplicatedByNode(String nodeName)
    
public  intgetReplicantsViewId(String key)
    
public  voidinit()
    
public  booleanisMasterReplica(String key)
    
public  StringlistContent()
    
public  StringlistXmlContent()
    
public  SerializablelookupLocalReplicant(String key)
    
public  Object[]lookupLocalReplicants()
    
public  ListlookupReplicants(String key)
    
public  ListlookupReplicantsNodeNames(String key)
    
public  voidmembershipChanged(Vector deadMembers, Vector newMembers, Vector allMembers)
    
public  voidmembershipChangedDuringMerge(Vector deadMembers, Vector newMembers, Vector allMembers, Vector originatingGroups)
    
protected  voidmergeMembers()
    
protected static synchronized  intnextThreadID()
    
protected  voidnotifyKeyListeners(String key, List newReplicants)
    
public  voidprocessEvent(Object event)
    
protected  voidpurgeDeadMembers(Vector deadMembers)
     get rid of dead members from replicant list return true if anything was purged.
public  voidregisterListener(String key, DistributedReplicantManager.ReplicantListener subscriber)
    
public  voidremove(String key)
    
protected  voidremoveLocal(String key)
    
protected  booleanremoveReplicant(String key, String nodeName)
    
protected  booleanreplicantEntryAlreadyExists(String key, String nodeName)
    
protected  booleanreplicantEntryAlreadyExists(Map map, String key, String nodeName)
    
protected  voidrepublishLocalReplicants()
    
public  voidsetCurrentState(Serializable newState)
    
public  voidstart()
    
public  voidstop()
    
public  voidunregisterListener(String key, DistributedReplicantManager.ReplicantListener subscriber)
    
protected  intupdateReplicantsHashId(String key)
    

Field Detail
SERVICE_NAME
final protected static String SERVICE_NAME(Code)



add_types
protected Class[] add_types(Code)



asynchHandler
protected AsynchEventHandler asynchHandler(Code)
The handler used to send replicant change notifications asynchronously



intraviewIdCache
protected HashMap intraviewIdCache(Code)



jmxName
protected ObjectName jmxName(Code)



keyListeners
protected ConcurrentReaderHashMap keyListeners(Code)



localReplicants
protected ConcurrentReaderHashMap localReplicants(Code)



log
protected Logger log(Code)



mbeanserver
protected MBeanServer mbeanserver(Code)



nodeName
protected String nodeName(Code)



partition
protected HAPartition partition(Code)



partitionNameKnown
protected Latch partitionNameKnown(Code)



remove_types
protected Class[] remove_types(Code)



replicants
protected ConcurrentReaderHashMap replicants(Code)



threadID
protected static int threadID(Code)



trace
protected boolean trace(Code)




Constructor Detail
DistributedReplicantManagerImpl
public DistributedReplicantManagerImpl(HAPartition partition, MBeanServer server)(Code)
This class manages replicated objects through the given partition
Parameters:
  partition - HAPartition through which replicated objects will be exchanged




Method Detail
_add
public void _add(String key, String nodeName, Serializable replicant)(Code)
Cluster callback called when a new replicant is added on another node
Parameters:
  key - Replicant key
Parameters:
  nodeName - Node that add the current replicant
Parameters:
  replicant - Serialized representation of the replicant



_remove
public void _remove(String key, String nodeName)(Code)
Cluster callback called when a replicant is removed by another node
Parameters:
  key - Name of the replicant key
Parameters:
  nodeName - Node that wants to remove its replicant for the give key



add
public void add(String key, Serializable replicant) throws Exception(Code)



addReplicant
protected void addReplicant(String key, String nodeName, Serializable replicant)(Code)
Add a replicant to the replicants map.
Parameters:
  key - replicant key name
Parameters:
  nodeName - name of the node that adds this replicant
Parameters:
  replicant - Serialized representation of the replica



addReplicant
protected void addReplicant(Map map, String key, String nodeName, Serializable replicant)(Code)
Logic for adding replicant to any map.
Parameters:
  map - structure in which adding the new replicant
Parameters:
  key - name of the replicant key
Parameters:
  nodeName - name of the node adding the replicant
Parameters:
  replicant - serialized representation of the replicant that is added



calculateReplicantsHash
protected int calculateReplicantsHash(List members)(Code)



cleanupKeyListeners
protected void cleanupKeyListeners()(Code)



destroy
public void destroy() throws Exception(Code)



getAllServices
public Collection getAllServices()(Code)



getCurrentState
public Serializable getCurrentState()(Code)



getKeysReplicatedByNode
protected Vector getKeysReplicatedByNode(String nodeName)(Code)



getReplicantsViewId
public int getReplicantsViewId(String key)(Code)



init
public void init() throws Exception(Code)



isMasterReplica
public boolean isMasterReplica(String key)(Code)



listContent
public String listContent() throws Exception(Code)



listXmlContent
public String listXmlContent() throws Exception(Code)



lookupLocalReplicant
public Serializable lookupLocalReplicant(String key)(Code)



lookupLocalReplicants
public Object[] lookupLocalReplicants() throws Exception(Code)
Cluster callback called when a node wants to know our complete list of local replicants
throws:
  Exception - Thrown if a cluster communication exception occurs A java array of size 2 containing the name of our node in this cluster and the serialized representation of our state



lookupReplicants
public List lookupReplicants(String key)(Code)



lookupReplicantsNodeNames
public List lookupReplicantsNodeNames(String key)(Code)



membershipChanged
public void membershipChanged(Vector deadMembers, Vector newMembers, Vector allMembers)(Code)



membershipChangedDuringMerge
public void membershipChangedDuringMerge(Vector deadMembers, Vector newMembers, Vector allMembers, Vector originatingGroups)(Code)



mergeMembers
protected void mergeMembers()(Code)



nextThreadID
protected static synchronized int nextThreadID()(Code)



notifyKeyListeners
protected void notifyKeyListeners(String key, List newReplicants)(Code)
Notifies, through a callback, the listeners for a given replicant that the set of replicants has changed
Parameters:
  key - The replicant key name
Parameters:
  newReplicants - The new list of replicants



processEvent
public void processEvent(Object event)(Code)



purgeDeadMembers
protected void purgeDeadMembers(Vector deadMembers)(Code)
get rid of dead members from replicant list return true if anything was purged.



registerListener
public void registerListener(String key, DistributedReplicantManager.ReplicantListener subscriber)(Code)



remove
public void remove(String key) throws Exception(Code)



removeLocal
protected void removeLocal(String key)(Code)



removeReplicant
protected boolean removeReplicant(String key, String nodeName) throws Exception(Code)



replicantEntryAlreadyExists
protected boolean replicantEntryAlreadyExists(String key, String nodeName)(Code)
Indicates if the a replicant already exists for a given key/node pair
Parameters:
  key - replicant key name
Parameters:
  nodeName - name of the node a boolean indicating if a replicant for the given node exists for the given key



replicantEntryAlreadyExists
protected boolean replicantEntryAlreadyExists(Map map, String key, String nodeName)(Code)
Indicates if the a replicant already exists for a given key/node pair in the give data structure



republishLocalReplicants
protected void republishLocalReplicants()(Code)



setCurrentState
public void setCurrentState(Serializable newState)(Code)



start
public void start() throws Exception(Code)



stop
public void stop() throws Exception(Code)



unregisterListener
public void unregisterListener(String key, DistributedReplicantManager.ReplicantListener subscriber)(Code)



updateReplicantsHashId
protected int updateReplicantsHashId(String key)(Code)



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(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.