
org.jppf.ui.options.xml.LoadBalancingSettings.groovy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jppf-admin Show documentation
Show all versions of jppf-admin Show documentation
JPPF, the open source grid computing solution
void refresh() {
StatsHandler.getInstance().getClientHandler().refreshLoadBalancer();
}
void apply() {
def connection = StatsHandler.getInstance().getClientHandler().currentJmxConnection();
if (connection == null) {
option.findFirstWithName("/LoadBalancingMessages").append("Not connected to a server");
return;
}
def algorithm = option.findFirstWithName("/Algorithm").getValue();
if (algorithm == null) {
option.findFirstWithName("/LoadBalancingMessages").append("No algorithm selected, use the 'Refresh' button to fill the list of algorithms");
return;
}
def params = new TypedProperties();
params.load(new StringReader(option.findFirstWithName("/LoadBalancingParameters").getValue()));
def msg = connection.changeLoadBalancerSettings(algorithm, params);
if (msg != null) option.findFirstWithName("/LoadBalancingMessages").append(msg);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy