this.isolationGroup = isolationGroup;
return this;
}
public JsonObject toJson() {
JsonObject json = new JsonObject();
if (worker) json.put("worker", true);
if (multiThreaded) json.put("multiThreaded", true);
if (isolationGroup != null) json.put("isolationGroup", isolationGroup);
if (ha) json.put("ha", true);
if (config != null) json.put("config", config);
if (extraClasspath != null) json.put("extraClasspath", new JsonArray(extraClasspath));
if (instances != DEFAULT_INSTANCES) {
json.put("instances", instances);
}
if (redeploy != DEFAULT_REDEPLOY) {
json.put("redeploy", redeploy);
}
if (redeployScanPeriod != DEFAULT_REDEPLOY_SCAN_PERIOD) {
json.put("redeployScanPeriod", redeployScanPeriod);
}
if (redeployGracePeriod != DEFAULT_REDEPLOY_GRACE_PERIOD) {
json.put("redeployGracePeriod", redeployGracePeriod);
}
return json;
}