org.bdware.doip.cluster.util.DoipClusterUtil Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of doip-audit-tool Show documentation
Show all versions of doip-audit-tool Show documentation
doip audit tool developed by bdware
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);
}
}