blob: 46b91a12f73653487e187134dee27a49118633e8 [file] [log] [blame]
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.uima.ducc;
public class ErrorHandlerDirective implements IErrorHandlerDirective {
private boolean killJob = false;
private boolean killProcess = true;
private boolean killWorkItem = true;
public ErrorHandlerDirective() {
}
public ErrorHandlerDirective(boolean killJob, boolean killProcess, boolean killWorkItem) {
setKillJob(killJob);
setKillProcess(killProcess);
setKillWorkItem(killWorkItem);
}
@Override
public boolean isKillJob() {
return killJob;
}
private void setKillJob(boolean value) {
killJob = value;
}
public void setKillJob() {
setKillJob(true);
}
public void resetKillJob() {
setKillJob(false);
}
@Override
public boolean isKillProcess() {
return killProcess;
}
private void setKillProcess(boolean value) {
killProcess = value;
}
public void setKillProcess() {
setKillProcess(true);
}
public void resetKillProcess() {
setKillProcess(false);
}
@Override
public boolean isKillWorkItem() {
return killWorkItem;
}
private void setKillWorkItem(boolean value) {
killWorkItem = value;
}
public void setKillWorkItem() {
setKillWorkItem(true);
}
public void resetKillWorkItem() {
setKillWorkItem(false);
}
}