Package org.jgroups.protocols.relay

Examples of org.jgroups.protocols.relay.SiteUUID


        if(Util.isFlagSet(flags,Address.UUID_ADDR)) {
            addr=new UUID();
            addr.readFrom(in);
        }
        else if(Util.isFlagSet(flags,Address.SITE_UUID)) {
            addr=new SiteUUID();
            addr.readFrom(in);
        }
        else if(Util.isFlagSet(flags,Address.SITE_MASTER)) {
            addr=new SiteMaster();
            addr.readFrom(in);
View Full Code Here


        if(Util.isFlagSet(flags,Address.UUID_ADDR)) {
            addr=new UUID();
            addr.readFrom(in);
        }
        else if(Util.isFlagSet(flags,Address.SITE_UUID)) {
            addr=new SiteUUID();
            addr.readFrom(in);
        }
        else if(Util.isFlagSet(flags,Address.SITE_MASTER)) {
            addr=new SiteMaster();
            addr.readFrom(in);
View Full Code Here

        req.suspect(c);
        checkComplete(req, true);
    }

    public void testResponsesComplete3() {
        Address one=new SiteUUID((UUID)Util.createRandomAddress("lon1"), "lon1", "LON");
        Address two=new SiteUUID((UUID)Util.createRandomAddress("sfo1"), "sfo1", "SFO");
        Address three=new SiteUUID((UUID)Util.createRandomAddress("nyc1"), "nyc1", "NYC");

        GroupRequest<Integer> req=new GroupRequest<Integer>(null, null, Arrays.asList(one, two, three), RequestOptions.SYNC());
        req.suspect(one);
        req.receiveResponse(1, one, false);
        req.siteUnreachable("LON");
View Full Code Here

    public static void testRelay2Header() throws Exception {
        Address dest=new SiteMaster("sfo");
        RELAY2.Relay2Header hdr=new RELAY2.Relay2Header(RELAY2.Relay2Header.DATA, dest, null);
        _testSize(hdr);
        Address sender=new SiteUUID(UUID.randomUUID(), "dummy", "sfo");
        hdr=new RELAY2.Relay2Header(RELAY2.Relay2Header.DATA, dest, sender);
        _testSize(hdr);
    }
View Full Code Here

        assert map.get(sm2) == 2;
    }

    public void testSiteUUID() throws Exception {
        UUID a=(UUID)Util.createRandomAddress("A"), b=(UUID)Util.createRandomAddress("B");
        SiteUUID sa=new SiteUUID(a, "sm-a", "sfo");
        SiteUUID sb=(SiteUUID)new SiteUUID(b, "b", "lon").setFlag(ExtendedUUID.can_become_site_master)
          .put(Util.stringToBytes("id"),Util.objectToByteBuffer(322649));
        System.out.println("sb = " + sb);
        assert sa.getName().equals("sm-a");
        assert sa.getSite().equals("sfo");
        SiteUUID copy=(SiteUUID)sb.copy();
        assert copy.equals(sb);
        assert copy.getName().equals(sb.getName());
        assert copy.getSite().equals(sb.getSite());
    }
View Full Code Here

TOP

Related Classes of org.jgroups.protocols.relay.SiteUUID

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.