
com.github.nicosensei.textbatch.ResultFileBatchController Maven / Gradle / Ivy
/**
*
*/
package com.github.nicosensei.textbatch;
import java.io.File;
import com.github.nicosensei.textbatch.input.InputLine;
/**
* @author ngiraud
*
*/
public abstract class ResultFileBatchController<
L extends InputLine,
J extends ResultFileBatchWorker>
extends Batch {
@Override
public ResultFileBatchState getBatchState() {
return (ResultFileBatchState) super.getBatchState();
}
@Override
protected void onComplete() throws BatchException {
File resultFile = new File(getBatchState().getResultFilePath());
if (resultFile.exists() && resultFile.length() == 0) {
BatchExecutor.getInstance().registerFileForCleanup(resultFile);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy