Package org.jgroups

Examples of org.jgroups.Membership


        a1=Util.createRandomAddress();
        a2=Util.createRandomAddress();
        a3=a2;
        a4=Util.createRandomAddress();
        a5=Util.createRandomAddress();
        m1=new Membership();
    }
View Full Code Here


    }


    public void testConstructor() {
        v1=Arrays.asList(a1, a2, a3);
        m2=new Membership(v1);
        assert m2.size() == 2;
        assert m2.contains(a1);
        assert m2.contains(a2);
        assert m2.contains(a3);
    }
View Full Code Here

    }


    public void testClone() {
        v1=Arrays.asList(a1, a2, a3);
        m2=new Membership(v1);
        m1=(Membership)m2.clone();
        assert m1.size()  == m2.size();
        assert m1.contains(a1);
        assert m1.contains(a2);
        assert m2.contains(a1);
View Full Code Here



    public void testCopy() {
        v1=Arrays.asList(a1, a2, a3);
        m2=new Membership(v1);
        m1=m2.copy();
        assert m1.size() == m2.size();
        assert m1.contains(a1);
        assert m1.contains(a2);
        assert m2.contains(a1);
View Full Code Here

    }



    public void testSet2() {
        m1=new Membership();
        m2=new Membership();
        m1.add(a1, a2, a4);
        m2.add(a5);
        m2.set(m1);
        assert m2.size() == 3;
        assert m2.contains(a1);
View Full Code Here

        a1=new IpAddress(5555);
        a2=new IpAddress(6666);
        a3=new IpAddress(6666);
        a4=new IpAddress(7777);
        a5=new IpAddress(8888);
        m1=new Membership();
    }
View Full Code Here

    public void testConstructor() {
        v1=new Vector();
        v1.addElement(a1);
        v1.addElement(a2);
        v1.addElement(a3);
        m2=new Membership(v1);
        assertTrue(m2.size() == 2);
        assertTrue(m2.contains(a1));
        assertTrue(m2.contains(a2));
        assertTrue(m2.contains(a3));
    }
View Full Code Here

    public void testClone() {
        v1=new Vector();
        v1.addElement(a1);
        v1.addElement(a2);
        v1.addElement(a3);
        m2=new Membership(v1);
        m1=(Membership)m2.clone();
        assertEquals(m1.size(), m2.size());
        assertTrue(m1.contains(a1));
        assertTrue(m1.contains(a2));
        assertTrue(m2.contains(a1));
View Full Code Here

    public void testCopy() {
        v1=new Vector();
        v1.addElement(a1);
        v1.addElement(a2);
        v1.addElement(a3);
        m2=new Membership(v1);
        m1=m2.copy();
        assertEquals(m1.size(), m2.size());
        assertTrue(m1.contains(a1));
        assertTrue(m1.contains(a2));
        assertTrue(m2.contains(a1));
View Full Code Here

        assertTrue(m1.contains(a2));
    }


    public void testSet2() {
        m1=new Membership();
        m2=new Membership();
        m1.add(a1);
        m1.add(a2);
        m1.add(a4);
        m2.add(a5);
        m2.set(m1);
View Full Code Here

TOP

Related Classes of org.jgroups.Membership

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.