use of org.knime.core.data.filestore.internal.IWriteFileStoreHandler in project knime-core by knime.
the class AbstractTableStoreWriter method getFileStoreKeyAndFlush.
/**
* @param cell
* @return
* @throws IOException
*/
public FileStoreKey getFileStoreKeyAndFlush(final DataCell cell) throws IOException {
FileStoreKey fileStoreKey = null;
if (cell instanceof FileStoreCell) {
final FileStoreCell fsCell = (FileStoreCell) cell;
FileStore fileStore = FileStoreUtil.getFileStore(fsCell);
// TODO is the 'else' case realistic?
if (getFileStoreHandler() instanceof IWriteFileStoreHandler) {
fileStoreKey = getFileStoreHandler().translateToLocal(fileStore, fsCell);
} else {
// handler is not an IWriteFileStoreHandler but the buffer still contains file stores:
// the flow is part of a workflow and all file stores were already properly handled
// (this buffer is restored from disc - and then a memory alert forces the data back onto disc)
fileStoreKey = FileStoreUtil.getFileStoreKey(fileStore);
}
FileStoreUtil.invokeFlush(fsCell);
}
return fileStoreKey;
}
Aggregations