Class FileWriterTaskFromProcessBuilder
java.lang.Object
org.aksw.shellgebra.exec.stage.FileWriterTaskBase
org.aksw.shellgebra.exec.stage.FileWriterTaskViaExecutor
org.aksw.shellgebra.exec.stage.FileWriterTaskFromProcessBuilder
- All Implemented Interfaces:
AutoCloseable, FileWriterTask
Writer task based on a system process created from a system call.
-
Nested Class Summary
Nested classes/interfaces inherited from class FileWriterTaskViaExecutor
FileWriterTaskViaExecutor.WorkerNested classes/interfaces inherited from class FileWriterTaskBase
FileWriterTaskBase.TaskState -
Field Summary
Fields inherited from class FileWriterTaskViaExecutor
lockFields inherited from class FileWriterTaskBase
isAbortCalled, outputPath, pathLifeCycle, state -
Constructor Summary
ConstructorsConstructorDescriptionFileWriterTaskFromProcessBuilder(Path outputPath, PathLifeCycle pathLifeCycle, List<ProcessBuilder> processBuilders, List<FileWriterTask> inputTasks, com.google.common.io.ByteSource inputSource, org.aksw.commons.io.util.stream.OutputStreamTransform outputTransform) -
Method Summary
Modifier and TypeMethodDescriptionvoidprotected final voidprotected voidCalled on completion - regardless whether successful or not.protected voidMethod that allows for setting up resources in an atomic way.voidtoString()Methods inherited from class FileWriterTaskViaExecutor
abort, close, closeActual, start, waitForCompletionMethods inherited from class FileWriterTaskBase
checkIfAbortHasBeenCalled, checkIfNew, getOutputPath, getState, isFinished, isStarted
-
Constructor Details
-
FileWriterTaskFromProcessBuilder
public FileWriterTaskFromProcessBuilder(Path outputPath, PathLifeCycle pathLifeCycle, List<ProcessBuilder> processBuilders, List<FileWriterTask> inputTasks, com.google.common.io.ByteSource inputSource, org.aksw.commons.io.util.stream.OutputStreamTransform outputTransform)
-
-
Method Details
-
beforeExec
- Throws:
IOException
-
prepareWriteFile
Description copied from class:FileWriterTaskBaseMethod that allows for setting up resources in an atomic way. STARTING.- Specified by:
prepareWriteFilein classFileWriterTaskBase- Throws:
IOException
-
runWriteFile
- Specified by:
runWriteFilein classFileWriterTaskBase- Throws:
org.apache.commons.exec.ExecuteExceptionIOException
-
abortActual
public void abortActual()- Specified by:
abortActualin classFileWriterTaskViaExecutor
-
onCompletion
Description copied from class:FileWriterTaskBaseCalled on completion - regardless whether successful or not. Only called if prepareWriteFile has been called before. (doWriteFile may not have been called).- Overrides:
onCompletionin classFileWriterTaskViaExecutor- Throws:
IOException
-
toString
- Overrides:
toStringin classFileWriterTaskViaExecutor
-