All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.bdware.doip.cluster.util.DoipClusterUtil Maven / Gradle / Ivy

There is a newer version: 1.5.4
Show newest version
package org.bdware.doip.cluster.util;

import wrp.jdk.nashorn.internal.objects.NativeArray;

public class DoipClusterUtil {
    public String[] doipServers;

    public Object getMembers() {
        if (doipServers == null) {
            return new NativeArray();
        }
        NativeArray narray = new NativeArray();
        for (int i = 0; i < doipServers.length; i++)
            NativeArray.push(narray, doipServers[i]);
        return narray;
    }

    public String getMember(int i) {
        return doipServers[i];
    }

    public int getMembersSize() {
        if (doipServers != null)
            return doipServers.length;
        return 1;
    }

    public boolean isCluster() {
        return (doipServers != null);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy