Package org.jgroups.util

Examples of org.jgroups.util.StackType


    private String           gossip_router_hosts;


    @BeforeMethod
    void setUp() throws Exception {
        StackType type=Util.getIpStackType();
        if(type == StackType.IPv6)
            bind_addr="::1";
        else
            bind_addr="127.0.0.1";
        promise=new Promise<Boolean>();
View Full Code Here


    IpAddress a, b, c, d, e, f, g, h, i, j, k;

   
    @BeforeClass
    void setUp() throws Exception {
        StackType type=Util.getIpStackType();
        if(type == StackType.IPv6) {
            a=new IpAddress("::1", 5555);
            b=new IpAddress("::1", 5555);
            d=new IpAddress("::1", 5556);
            e=new IpAddress("::1", 5555);
View Full Code Here


    public static void testEqualityWithDnsRoundRobin() throws UnknownHostException {
        IpAddress x1, x2, x3;

        StackType type=Util.getIpStackType();
        String tmp=type == StackType.IPv6? "::1" : "127.0.0.1";
        InetAddress addr=InetAddress.getByName(tmp);
        byte[] rawAddr=addr.getAddress();

        InetAddress inet1=InetAddress.getByAddress("MyHost1", rawAddr);
View Full Code Here

        Assert.assertEquals(h, h2);
    }


    private static IpAddress createStackConformantAddress(int port) throws UnknownHostException {
        StackType type=Util.getIpStackType();
        if(type == StackType.IPv6)
            return new IpAddress("::1", port);
        else
            return new IpAddress("127.0.0.1", port);
    }
View Full Code Here

    protected String              gossip_router_hosts;
    protected InetAddress         bind_addr;

    @BeforeClass
    void startRouter() throws Exception {
        StackType type=Util.getIpStackType();
        String bind_addr_str=type == StackType.IPv6? "::1" : "127.0.0.1";
        bind_addr=InetAddress.getByName(bind_addr_str);
        gossip_router_port=ResourceManager.getNextTcpPort(bind_addr);
        gossip_router_hosts=bind_addr.getHostAddress() + "[" + gossip_router_port + "]";
        gossipRouter=new GossipRouter(gossip_router_port, bind_addr_str);
View Full Code Here

    @BeforeClass
    void startRouter() throws Exception {
        String tmp=Util.getProperty(Global.BIND_ADDR);
        if(tmp == null) {
            StackType type=Util.getIpStackType();
            tmp=type == StackType.IPv6? "::1" : "127.0.0.1";
        }

        bind_addr=InetAddress.getByName(tmp);
        gossip_router_port=ResourceManager.getNextTcpPort(bind_addr);
View Full Code Here

    protected InetAddress         bind_addr;
    protected String              bind_addr_str;

    @BeforeClass
    protected void setUp() throws Exception {
        StackType type=Util.getIpStackType();
        bind_addr_str=type == StackType.IPv6? "::1" : "127.0.0.1";
        bind_addr=InetAddress.getByName(bind_addr_str);
        gossip_router_port=ResourceManager.getNextTcpPort(bind_addr);
        gossip_router_hosts=bind_addr.getHostAddress() + "[" + gossip_router_port + "]";
    }
View Full Code Here

                }
                query.add(args[i]);
            }
            Probe p=new Probe();
            if(addr == null) {
                StackType stack_type=Util.getIpStackType();
                boolean ipv6=stack_type == StackType.IPv6;
                addr=ipv6? InetAddress.getByName(DEFAULT_DIAG_ADDR_IPv6) : InetAddress.getByName(DEFAULT_DIAG_ADDR);
            }
            if(port == 0)
                port=DEFAULT_DIAG_PORT;
View Full Code Here

        Test annotation = this.getClass().getAnnotation(Test.class);
        // this should never ever happen!
        if (annotation == null)
            throw new Exception("Test is not marked with @Test annotation");

        StackType type=Util.getIpStackType();
        bind_addr=type == StackType.IPv6 ? "::1" : "127.0.0.1";
        this.channel_conf = chconf;
        bind_addr = Util.getProperty(new String[]{Global.BIND_ADDR}, null, "bind_addr", bind_addr);
        System.setProperty(Global.BIND_ADDR, bind_addr);
    }
View Full Code Here

TOP

Related Classes of org.jgroups.util.StackType

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.