KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jgroups > protocols > Digest


1 // $Id: Digest.java,v 1.3 2004/09/23 16:29:41 belaban Exp $
2

3 package org.jgroups.protocols;
4
5 import org.jgroups.util.List;
6 import org.jgroups.util.Util;
7
8 import java.io.Serializable JavaDoc;
9
10
11
12
13 /**
14  * Message digest, collecting the highest sequence number seen so far for each member, plus the
15  * messages that have higher seqnos than the ones given.
16  */

17 public class Digest implements Serializable JavaDoc {
18     public long[] highest_seqnos=null; // highest seqno received for each member
19
public final List msgs=new List(); // msgs (for each member) whose seqnos are higher than the
20
// ones sent by the FLUSH coordinator
21
public Digest(int size) {
22     highest_seqnos=new long[size];
23     }
24
25     public String JavaDoc toString() {
26     StringBuffer JavaDoc retval=new StringBuffer JavaDoc();
27     retval.append(Util.array2String(highest_seqnos) + " (" + msgs.size() + " msgs)");
28     return retval.toString();
29     }
30     
31 }
32
Popular Tags