in uima-ducc-sm/src/main/java/org/apache/uima/ducc/sm/ServiceHandler.java [1159:1236]
void modifyRegistration(ServiceSet sset, UiOption option, String value)
{
int intval = 0;
boolean boolval = false;
// TODO: this case covers ALL service options, but note that only those in the modify list
// in the CLI are actually used. Eventually we will cover them all.
switch ( option ) {
case Instances:
intval = Integer.parseInt(value);
sset.updateRegisteredInstances(intval);
break;
case Autostart:
boolval = Boolean.parseBoolean(value);
sset.setAutostart(boolval);
break;
case Administrators:
sset.setJobProperty(option.pname(), value);
sset.parseAdministrators(value);
break;
// For the moment, these all update the registration but don't change internal
// operation.
case Description:
case LogDirectory:
case Jvm:
case ProcessJvmArgs:
case Classpath:
case SchedulingClass:
case Environment:
case ProcessMemorySize:
case ProcessExecutable:
case ProcessExecutableArgs:
case ServiceDependency:
case ProcessInitializationTimeMax:
case WorkingDirectory:
sset.setJobProperty(option.pname(), value);
break;
case InstanceInitFailureLimit:
sset.updateInitFailureLimit(value);
sset.setJobProperty(option.pname(), value);
break;
case ServiceLinger:
sset.updateLinger(value);
sset.setJobProperty(option.pname(), value);
break;
case ProcessDebug:
// Note this guy updates the props differently based on the value
sset.updateDebug(value); // value may be numeric, or "off"
break;
case ServicePingArguments:
case ServicePingClasspath:
case ServicePingJvmArgs:
case ServicePingTimeout:
case ServicePingDoLog:
case ServicePingClass:
case InstanceFailureWindow:
case InstanceFailureLimit:
if ( value.equals("default") ) {
sset.deleteJobProperty(option.pname());
} else {
sset.setJobProperty(option.pname(), value);
}
restart_pinger = true;
break;
default:
// In case a deprecated option such as classpath_order slips through
break;
}
}