private String getOption(String optionName,String defaultValue) { if(controllerCfg!=null) { ObjectNode node=controllerCfg.getOptions(); if(node!=null) { JsonNode value=node.get(optionName); if(value!=null&&!value.isNull()) return value.asText(); } } return defaultValue; }
public ConcurrentModificationDetectionCfg(ControllerConfiguration controllerCfg) { if(controllerCfg!=null) { ObjectNode options=controllerCfg.getOptions(); if(options!=null) { options=(ObjectNode)options.get("concurrentModification"); if(options!=null) { JsonNode value=options.get("detection"); if(value!=null) detect=options.asBoolean(); value=options.get("failureRetryCount"); if(value!=null) failureRetryCount=value.asInt(); value=options.get("reevaluateQueryForRetry"); if(value!=null) reevaluateQueryForRetry=value.asBoolean(); } } } }