Java Doc for STABLE.java in  » Net » JGroups-2.4.1-sp3 » org » jgroups » protocols » 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 » Net » JGroups 2.4.1 sp3 » org.jgroups.protocols 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.jgroups.stack.RpcProtocol
   org.jgroups.protocols.STABLE

STABLE
public class STABLE extends RpcProtocol (Code)
Computes the broadcast messages that are stable; i.e., that have been received by all members. Sends STABLE events up the stack when this is the case. Uses a probabilistic scheme to do so, as described in:
GSGC: An Efficient Gossip-Style Garbage Collection Scheme for Scalable Reliable Multicast, K. Guo et al., 1997.

The only difference is that instead of using counters for an estimation of messages received from each member, we retrieve this actual information from the NAKACK layer (which must be present for the STABLE protocol to work).

Note: the the Event.MSG call path path must be as lightweight as possible. It should not request any lock for which there is a high contention and/or long delay.

 Changes(igeorg - 2.VI.2001):
 i. Thread-safety (in RPC calls most notably on the lines of Gianluca
 Collot's bugfix)
 ii. All slow calls (RPCs, seqnos requests, etc.) placed outside locks
 iii. Removed redundant initialization in adaptation to a higher round
 iv. heard_from[this meber] is always set to true on every new round
 (i.e. on every stability bcast).
 v. Replaced gossip thread with TimeScheduler.Task
 

[[[ TODO(igeorg - 2.VI.2001) i. Faster stability convergence by better selection of gossip subsets (replace Util.pickSubset()). ii. Special mutex on the Event.MSG call path. I.e. remove synchronized(this)> with e.g. synchronized(msg_mutex). ]] TODO





Method Summary
public  StringgetName()
    
public  voidgossip(ViewId view_id, long gossip_round, long[] gossip_seqnos, boolean[] heard, Object sender)
     Contains the highest sequence numbers as seen by sender
Parameters:
  view_id - The view ID in which the gossip was sent.
public  booleanhandleDownEvent(Event evt)
     Callback.
public  booleanhandleUpEvent(Event evt)
     Callback.
public  VectorrequiredUpServices()
    
public  booleansetProperties(Properties props)
     Set the parameters for this layer.
public  voidstability(ViewId view_id, long gossip_round, long[] stability_vector, Object sender)
     Contains the highest message sequence numbers (for each member) that can safely be deleted (because they have been seen by all members).
public  voidstart()
     Start the layer: i.
public  voidstop()
    



Method Detail
getName
public String getName()(Code)
this protocol name



gossip
public void gossip(ViewId view_id, long gossip_round, long[] gossip_seqnos, boolean[] heard, Object sender)(Code)
Contains the highest sequence numbers as seen by sender
Parameters:
  view_id - The view ID in which the gossip was sent. Must be thesame as ours, otherwise it is discarded
Parameters:
  gossip_round - The round in which the gossip was sent
Parameters:
  gossip_seqnos - A vector with the highest sequence numbers asseen by sender
Parameters:
  heard - The sender's heard_from array. This allowsus to minimize the gossip msgs for a given round as a member does nothave to receive gossip msgs from each member, but members pass gossipsthey've received from others on in their own gossips. E.g. when amember P (of group {P,Q,R}) receives a gossip from R, its own gossipto Q might be {R,P}. Q, who hasn't received a gossip from R, will notneed to receive it anymore as it is already sent by P. This simplescheme reduces the number of gossip messages needed.
Parameters:
  sender - The sender of the gossip message (obviously :-))



handleDownEvent
public boolean handleDownEvent(Event evt)(Code)
Callback. Called by superclass when event may be handled.

Do not use PassDown in this method as the event is passed down by default by the superclass after this method returns ! boolean Defaults to true. If false, event will not be passeddown the stack.




handleUpEvent
public boolean handleUpEvent(Event evt)(Code)
Callback. Called by superclass when event may be handled.

Do not use PassUp in this method as the event is passed up by default by the superclass after this method returns ! boolean Defaults to true. If false, event will not be passedup the stack.




requiredUpServices
public Vector requiredUpServices()(Code)
The events expected to be handled from some layer above:
  • GET_MSGS_RECEIVED: NAKACK layer
a list of events expected by to be handled from some layerabove



setProperties
public boolean setProperties(Properties props)(Code)
Set the parameters for this layer.
  • subset: the percentage of the group'size to which the msgs_seen_so_far gossip is sent periodically.
  • max_msgs: the max number of msgs to wait for between two consecutive gossipings.
  • max_wait_time: the max time to wait for between two consecutive gossipings.
  • highest_seqno_timeout: time to wait to receive from NAKACK the array of highest deliverable seqnos

Parameters:
  props - the list of parameters



stability
public void stability(ViewId view_id, long gossip_round, long[] stability_vector, Object sender)(Code)
Contains the highest message sequence numbers (for each member) that can safely be deleted (because they have been seen by all members).



start
public void start() throws Exception(Code)
Start the layer: i. Set the gossip task scheduler ii. Reset the layer's state. iii. Start the gossiping task



stop
public void stop()(Code)
Stop scheduling the gossip task



Methods inherited from org.jgroups.stack.RpcProtocol
public Object callRemoteMethod(Address dest, String method_name, int mode, long timeout) throws TimeoutException, SuspectedException(Code)(Java Doc)
public Object callRemoteMethod(Address dest, String method_name, Object[] args, Class[] types, int mode, long timeout) throws TimeoutException, SuspectedException(Code)(Java Doc)
public Object callRemoteMethod(Address dest, String method_name, Object[] args, String[] signature, int mode, long timeout) throws TimeoutException, SuspectedException(Code)(Java Doc)
public Object callRemoteMethod(Address dest, MethodCall method_call, int mode, long timeout) throws TimeoutException, SuspectedException(Code)(Java Doc)
public RspList callRemoteMethods(Vector dests, String method_name, Object[] args, Class[] types, int mode, long timeout)(Code)(Java Doc)
public RspList callRemoteMethods(Vector dests, String method_name, Object[] args, String[] signature, int mode, long timeout)(Code)(Java Doc)
public RspList callRemoteMethods(Vector dests, MethodCall method_call, int mode, long timeout)(Code)(Java Doc)
public String getName()(Code)(Java Doc)
public Object handle(Message req)(Code)(Java Doc)
public boolean handleDownEvent(Event evt)(Code)(Java Doc)
public boolean handleUpEvent(Event evt)(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.