Java Doc for FLOW_CONTROL.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.MessageProtocol
   org.jgroups.protocols.FLOW_CONTROL

FLOW_CONTROL
public class FLOW_CONTROL extends MessageProtocol implements Runnable(Code)
FLOW_CONTROL provides end-end congestion control and flow control. Attempts to maximize through put, by minimizing the possible block times(Forward flow control). Initially, sender starts with a smaller window size W and large expected RTT grpRTT. Sender also keeps a margin in the window size. When the margin is hit, insted of waiting for the window size to be exhausted, sender multicasts a FLOW_CONTROL info request message. If the window size is exhausted before the responses are received, send will be blocked. FCInfo(flow control info) from all the receivers is gathered at the sender, and current RTT is computed. If the current RTT is greater than estimated RTT window size and margin are reduced, otherwise they are increased.

Horizontal interaction is initiated by the sender with the other group members.

Note: A reliable transport layer is required for this protocol to function properly. With little effort this can be made completely independent.

todo Handle view changes (e.g., members {A,B,C}, blocked on C, and C crashes --> unblock).
Also block on down() instead of sending BLOCK_SEND. // done, bela April 28 2006
author:
   Ananda Bollu




Constructor Summary
public  FLOW_CONTROL()
    

Method Summary
public  StringgetName()
    
public  Objecthandle(Message req)
     Called when a request for this protocol layer is received. Processes and return value is sent back in the reply. FLOW_CONTROL protocol of all members gets this message(including sender?) Object containing FC information for sender with senderID.Callback.
public  booleanhandleDownEvent(Event evt)
     If Event.MSG type is received count is incremented by one, and message is passed to the down_prot.
public  booleanhandleUpEvent(Event evt)
     If Event.MSG type is received message, number of received messages from the sender is incremented.
public  voidrun()
     FCInfo request must be submitted in a different thread. handleDownEvent() can still be called to send messages while waiting for FCInfo from receivers.
public  booleansetProperties(Properties props)
     Following parameters can be optionally supplied:
  • window size cap - int Limits the window size to a reasonable value.
  • window size - int these many number of messages are sent before a block could happen
  • forward margin -int a request for flow control information is sent when remaining window size hits this margin
  • RTT weight -double Max RTT in the group is calculated during each Flow control request.


Constructor Detail
FLOW_CONTROL
public FLOW_CONTROL()(Code)




Method Detail
getName
public String getName()(Code)



handle
public Object handle(Message req)(Code)
Called when a request for this protocol layer is received. Processes and return value is sent back in the reply. FLOW_CONTROL protocol of all members gets this message(including sender?) Object containing FC information for sender with senderID.Callback. Called when a request for this protocol layer is received.



handleDownEvent
public boolean handleDownEvent(Event evt)(Code)
If Event.MSG type is received count is incremented by one, and message is passed to the down_prot. At some point, based on the algorithm(FLOW_CONTROL protocol definition) data collection sequence is started. This is done by each member in SENDER role when _numMSGsSentThisPeriod hits the margin. Before rsp arrives only _fwdMarginSize number of messages can be sent, and then sender will be blocked.



handleUpEvent
public boolean handleUpEvent(Event evt)(Code)
If Event.MSG type is received message, number of received messages from the sender is incremented. And the message is passed up the stack.



run
public void run()(Code)
FCInfo request must be submitted in a different thread. handleDownEvent() can still be called to send messages while waiting for FCInfo from receivers. usually takes RTT.



setProperties
public boolean setProperties(Properties props)(Code)
Following parameters can be optionally supplied:
  • window size cap - int Limits the window size to a reasonable value.
  • window size - int these many number of messages are sent before a block could happen
  • forward margin -int a request for flow control information is sent when remaining window size hits this margin
  • RTT weight -double Max RTT in the group is calculated during each Flow control request. lower number assigns higher weight to current RTT in estimating RTT.
  • window size reduction factor -double When current RTT is greater than estimated RTT current window size is reduced by this multiple.
  • window size expansion factor -double When current RTT is less than estimated RTT window is incremented by this multiple.

See Also:   org.jgroups.stack.Protocol.setProperties(Properties)



Fields inherited from org.jgroups.stack.MessageProtocol
protected RequestCorrelator _corr(Code)(Java Doc)
final protected Vector members(Code)(Java Doc)

Methods inherited from org.jgroups.stack.MessageProtocol
public RspList castMessage(Vector dests, Message msg, int mode, long timeout)(Code)(Java Doc)
final public void down(Event evt)(Code)(Java Doc)
public Object handle(Message req)(Code)(Java Doc)
protected boolean handleDownEvent(Event evt)(Code)(Java Doc)
protected boolean handleUpEvent(Event evt)(Code)(Java Doc)
public Object sendMessage(Message msg, int mode, long timeout) throws TimeoutException, SuspectedException(Code)(Java Doc)
public void start() throws Exception(Code)(Java Doc)
public void stop()(Code)(Java Doc)
final public void up(Event evt)(Code)(Java Doc)
protected void updateView(View new_view)(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.