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


java.lang.Object
   org.jgroups.protocols.pbcast.Digest

Digest
public class Digest implements Externalizable,Streamable(Code)
A message digest, which is used by the PBCAST layer for gossiping (also used by NAKACK for keeping track of current seqnos for all members). It contains pairs of senders and a range of seqnos (low and high), where each sender is associated with its highest and lowest seqnos seen so far. That is, the lowest seqno which was not yet garbage-collected and the highest that was seen so far and is deliverable (or was already delivered) to the application. A range of [0 - 0] means no messages have been received yet.

April 3 2001 (bela): Added high_seqnos_seen member. It is used to disseminate information about the last (highest) message M received from a sender P. Since we might be using a negative acknowledgment message numbering scheme, we would never know if the last message was lost. Therefore we periodically gossip and include the last message seqno. Members who haven't seen it (e.g. because msg was dropped) will request a retransmission. See DESIGN for details.
author:
   Bela Ban


Inner Class :public static class Entry implements Externalizable

Field Summary
final protected static  Loglog
    
 Mapsenders
    
final static  booleanwarn
    

Constructor Summary
public  Digest()
    
public  Digest(int size)
    

Method Summary
public  voidadd(Address sender, long low_seqno, long high_seqno)
    
public  voidadd(Address sender, long low_seqno, long high_seqno, long high_seqno_seen)
    
public  voidadd(Digest d)
    
public  voidclear()
    
public  booleancontains(Address sender)
    
public  Digestcopy()
    
public  booleanequals(Object obj)
    
public  Entryget(Address sender)
    
public  longhighSeqnoAt(Address sender)
    
public  longhighSeqnoSeenAt(Address sender)
    
public  voidincrementHighSeqno(Address sender)
     Increments the sender's high_seqno by 1.
public  longlowSeqnoAt(Address sender)
    
public  voidmerge(Digest d)
     Adds a digest to this digest.
public  voidmerge(Address sender, long low_seqno, long high_seqno, long high_seqno_seen)
    
public  StringprintHighSeqnos()
    
public  StringprintHighSeqnosSeen()
    
public  voidreadExternal(ObjectInput in)
    
public  voidreadFrom(DataInputStream in)
    
public  voidreplace(Digest d)
    
public  voidresetAt(Address sender)
     Resets the seqnos for the sender at 'index' to 0.
public  booleansameSenders(Digest other)
     Compares two digests and returns true if the senders are the same, otherwise false.
public  longserializedSize()
    
public  booleanset(Address sender, long low_seqno, long high_seqno, long high_seqno_seen)
    
public  voidsetHighSeqnoAt(Address sender, long high_seqno)
    
public  voidsetHighSeqnoSeenAt(Address sender, long high_seqno_seen)
    
public  voidsetHighestDeliveredAndSeenSeqnos(Address sender, long high_seqno, long high_seqno_seen)
    
public  intsize()
    
public  StringtoString()
    
public  voidwriteExternal(ObjectOutput out)
    
public  voidwriteTo(DataOutputStream out)
    

Field Detail
log
final protected static Log log(Code)



senders
Map senders(Code)
Map



warn
final static boolean warn(Code)




Constructor Detail
Digest
public Digest()(Code)



Digest
public Digest(int size)(Code)




Method Detail
add
public void add(Address sender, long low_seqno, long high_seqno)(Code)



add
public void add(Address sender, long low_seqno, long high_seqno, long high_seqno_seen)(Code)



add
public void add(Digest d)(Code)



clear
public void clear()(Code)



contains
public boolean contains(Address sender)(Code)



copy
public Digest copy()(Code)



equals
public boolean equals(Object obj)(Code)



get
public Entry get(Address sender)(Code)



highSeqnoAt
public long highSeqnoAt(Address sender)(Code)



highSeqnoSeenAt
public long highSeqnoSeenAt(Address sender)(Code)



incrementHighSeqno
public void incrementHighSeqno(Address sender)(Code)
Increments the sender's high_seqno by 1.



lowSeqnoAt
public long lowSeqnoAt(Address sender)(Code)



merge
public void merge(Digest d)(Code)
Adds a digest to this digest. This digest must have enough space to add the other digest; otherwise an error message will be written. For each sender in the other digest, the merge() method will be called.



merge
public void merge(Address sender, long low_seqno, long high_seqno, long high_seqno_seen)(Code)
Similar to add(), but if the sender already exists, its seqnos will be modified (no new entry) as follows:
  1. this.low_seqno=min(this.low_seqno, low_seqno)
  2. this.high_seqno=max(this.high_seqno, high_seqno)
  3. this.high_seqno_seen=max(this.high_seqno_seen, high_seqno_seen)
If the sender doesn not exist, a new entry will be added (provided there is enough space)



printHighSeqnos
public String printHighSeqnos()(Code)



printHighSeqnosSeen
public String printHighSeqnosSeen()(Code)



readExternal
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException(Code)



readFrom
public void readFrom(DataInputStream in) throws IOException, IllegalAccessException, InstantiationException(Code)



replace
public void replace(Digest d)(Code)



resetAt
public void resetAt(Address sender)(Code)
Resets the seqnos for the sender at 'index' to 0. This happens when a member has left the group, but it is still in the digest. Resetting its seqnos ensures that no-one will request a message retransmission from the dead member.



sameSenders
public boolean sameSenders(Digest other)(Code)
Compares two digests and returns true if the senders are the same, otherwise false.
Parameters:
  other - True if senders are the same, otherwise false.



serializedSize
public long serializedSize()(Code)



set
public boolean set(Address sender, long low_seqno, long high_seqno, long high_seqno_seen)(Code)



setHighSeqnoAt
public void setHighSeqnoAt(Address sender, long high_seqno)(Code)



setHighSeqnoSeenAt
public void setHighSeqnoSeenAt(Address sender, long high_seqno_seen)(Code)



setHighestDeliveredAndSeenSeqnos
public void setHighestDeliveredAndSeenSeqnos(Address sender, long high_seqno, long high_seqno_seen)(Code)



size
public int size()(Code)



toString
public String toString()(Code)



writeExternal
public void writeExternal(ObjectOutput out) throws IOException(Code)



writeTo
public void writeTo(DataOutputStream out) throws IOException(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.