01: // $Id: Digest.java,v 1.4 2005/08/08 12:45:42 belaban Exp $
02:
03: package org.jgroups.protocols;
04:
05: import org.jgroups.util.List;
06: import org.jgroups.util.Util;
07:
08: import java.io.Serializable;
09:
10: /**
11: * Message digest, collecting the highest sequence number seen so far for each member, plus the
12: * messages that have higher seqnos than the ones given.
13: */
14: public class Digest implements Serializable {
15: public long[] highest_seqnos = null; // highest seqno received for each member
16: public final List msgs = new List(); // msgs (for each member) whose seqnos are higher than the
17: private static final long serialVersionUID = -1750370226005341630L;
18:
19: // ones sent by the FLUSH coordinator
20:
21: public Digest(int size) {
22: highest_seqnos = new long[size];
23: }
24:
25: public String toString() {
26: StringBuffer retval = new StringBuffer();
27: retval.append(Util.array2String(highest_seqnos)).append(" (")
28: .append(msgs.size()).append(" msgs)");
29: return retval.toString();
30: }
31:
32: }
|