class CSVReaderDataPool extends FileReaderDataPool {

	@Override
	public void close() {
		super.close();

		try {
			tempFileWriter.close();
			// persist the changes if necessary
			if (isWriteEnabled() && hasChanges.get()) {
				// move the initial file
				File initialFile = new File(filePath + ".initial");
				Files.move(new File(filePath), initialFile);
				// replace the initial file by the temporary file containing the changes
				Files.move(tempFile, new File(filePath));
				// delete the initial file
				initialFile.delete();
			}
			tempFile.delete();
		} catch (IOException e) {
			logger.error("Error while closing the CSV dataset", e);
		}
	}

	public  CSVReaderDataPool(CSVDataPool configuration);

}