Package org.jgroups.protocols.pbcast

Examples of org.jgroups.protocols.pbcast.Digest$Entry


        d.writeTo(dos);
        dos.close();
        byte[] buf=outstream.toByteArray();
        ByteArrayInputStream instream=new ByteArrayInputStream(buf);
        DataInputStream dis=new DataInputStream(instream);
        Digest tmp=new Digest();
        tmp.readFrom(dis);
        assertEquals(d, tmp);
    }
View Full Code Here


        _testSize(hdr);
    }

    public void testStableHeader() throws Exception {
        org.jgroups.protocols.pbcast.STABLE.StableHeader hdr;
        Digest digest=new Digest(2);
        IpAddress addr=new IpAddress("127.0.0.1", 5555);
        digest.add(addr, 100, 200, 205);
        hdr=new STABLE.StableHeader(STABLE.StableHeader.STABLE_GOSSIP, digest);
        _testSize(hdr);

        hdr=new STABLE.StableHeader(STABLE.StableHeader.STABILITY, null);
        _testSize(hdr);
View Full Code Here

      switch (evt.getType())
      {
         case Event.GET_DIGEST:
         case Event.GET_DIGEST_STATE:

            Digest d = new Digest(members.size());
            Address sender = null;
            //all members have same digest :)
            for (int j = 0; j < members.size(); j++)
            {
               sender = (Address) members.elementAt(j);
               d.add(sender, highestSeenSeq, highestSeenSeq);
            }
            passUp(new Event(Event.GET_DIGEST_OK, d));
            return false;
         case Event.SET_DIGEST:
            Digest receivedDigest = (Digest) evt.getArg();

          // changed by bela July 12 2005, not sure if this is correct, don't know what the original author
          // intended to do here
            // myAru = receivedDigest.highSeqnoAt(0);
            myAru = receivedDigest.highSeqnoAt(localAddress);
            return false;

         case Event.VIEW_CHANGE:
            onViewChange();
            return true;
View Full Code Here

TOP

Related Classes of org.jgroups.protocols.pbcast.Digest$Entry

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.