Package org.jgroups.util

Examples of org.jgroups.util.StackType


    @BeforeMethod
    void setUp() throws Exception {
        String bind_addr=Util.getProperty(Global.BIND_ADDR);
        if(bind_addr == null) {
            StackType type=Util.getIpStackType();
            if(type == StackType.IPv6)
                bind_addr="::1";
            else
                bind_addr="127.0.0.1";
        }
View Full Code Here


    @BeforeClass
    void startRouter() throws Exception {
        String bind_addr=Util.getProperty(Global.BIND_ADDR);
        if(bind_addr == null) {
            StackType type=Util.getIpStackType();
            if(type == StackType.IPv6)
                bind_addr="::1";
            else
                bind_addr="127.0.0.1";
        }
View Full Code Here

    @BeforeClass
    protected void setUp() {
        bind_addr=Util.getProperty(Global.BIND_ADDR);
        if(bind_addr == null) {
            StackType type=Util.getIpStackType();
            if(type == StackType.IPv6)
                bind_addr="::1";
            else
                bind_addr="127.0.0.1";
        }
View Full Code Here

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

   
    @BeforeClass
    public 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

        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";

        List<String> groups = Arrays.asList(annotation.groups());
        boolean testRequiresFlush = groups.contains(Global.FLUSH);
View Full Code Here

    }

    private String getRouterBindAddress() {
        String bind_addr = Util.getProperty(Global.BIND_ADDR);
        if (bind_addr == null) {
            StackType type = Util.getIpStackType();
            if (type == StackType.IPv6)
                bind_addr = "::1";
            else
                bind_addr = "127.0.0.1";
        }
View Full Code Here

       
        // check InetAddress related features of stack
        Map<String, Map<String,InetAddressInfo>> inetAddressMap = createInetAddressMap(protocol_configs, protocols) ;
        Collection<InetAddress> addrs=getAddresses(inetAddressMap);

        StackType ip_version=Util.getIpStackType(); // 0 = n/a, 4 = IPv4, 6 = IPv6

        if(!addrs.isEmpty()) {
            // check that all user-supplied InetAddresses have a consistent version:
            // 1. If an addr is IPv6 and we have an IPv4 stack --> FAIL
            // 2. If an address is an IPv4 class D (multicast) address and the stack is IPv6: FAIL
View Full Code Here

        if(protocols == null)
            return;

        // check InetAddress related features of stack
        Collection<InetAddress> addrs=getInetAddresses(protocols);
        StackType ip_version=Util.getIpStackType(); // 0 = n/a, 4 = IPv4, 6 = IPv6

        if(!addrs.isEmpty()) {
            // check that all user-supplied InetAddresses have a consistent version:
            // 1. If an addr is IPv6 and we have an IPv4 stack --> FAIL
            // 2. If an address is an IPv4 class D (multicast) address and the stack is IPv6: FAIL
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.