"<maxConsecutiveRestarts>", maxRestarts.getAction() })));
}
actionOnMaxRestarts = maxRestarts.getAction();
// Setup Error rate Threshold in terms of (count)/(sample size) eg. 3/1000
CasProcessorErrorRateThreshold errorRateThresholdType = casProcessorErrorHandling
.getErrorRateThreshold();
if (errorRateThresholdType == null) {
throw new ResourceConfigurationException(
ResourceConfigurationException.MANDATORY_VALUE_MISSING, new Object[] {
"errorRateThreshold", "CPE" },
new Exception(CpmLocalizedMessage.getLocalizedMessage(
CPMUtils.CPM_LOG_RESOURCE_BUNDLE,
"UIMA_CPM_EXP_missing_xml_element__WARNING", new Object[] {
Thread.currentThread().getName(), name, "<errorRateThreshold>" })));
}
errorRate = errorRateThresholdType.getMaxErrorCount();
errorSampleSize = errorRateThresholdType.getMaxErrorSampleSize();
if (!validActionOnError(errorRateThresholdType.getAction())) {
throw new ResourceConfigurationException(
ResourceConfigurationException.MANDATORY_VALUE_MISSING, new Object[] { "action",
"CPE" }, new Exception(CpmLocalizedMessage.getLocalizedMessage(
CPMUtils.CPM_LOG_RESOURCE_BUNDLE, "UIMA_CPM_EXP_bad_action_string__WARNING",
new Object[] { Thread.currentThread().getName(), name,
"<errorRateThreshold>", maxRestarts.getAction() })));
}
actionOnMaxError = errorRateThresholdType.getAction();
CasProcessorTimeout timeoutType = casProcessorErrorHandling.getTimeout();
timeOut = timeoutType.get();
}