Package org.aksw.shellgebra.exec
Class FileWriterTaskFromProcess
java.lang.Object
org.aksw.shellgebra.exec.FileWriterTaskBase
org.aksw.shellgebra.exec.FileWriterTaskViaExecutor
org.aksw.shellgebra.exec.FileWriterTaskFromProcess
- 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 org.aksw.shellgebra.exec.FileWriterTaskViaExecutor
FileWriterTaskViaExecutor.WorkerNested classes/interfaces inherited from class org.aksw.shellgebra.exec.FileWriterTaskBase
FileWriterTaskBase.PathLifeCycle, FileWriterTaskBase.TaskState -
Field Summary
Fields inherited from class org.aksw.shellgebra.exec.FileWriterTaskViaExecutor
lockFields inherited from class org.aksw.shellgebra.exec.FileWriterTaskBase
isAbortCalled, outputPath, pathLifeCycle, state -
Constructor Summary
ConstructorsConstructorDescriptionFileWriterTaskFromProcess(Path outputPath, FileWriterTaskBase.PathLifeCycle pathLifeCycle, String... cmd) -
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 org.aksw.shellgebra.exec.FileWriterTaskViaExecutor
abort, close, closeActual, start, waitForCompletionMethods inherited from class org.aksw.shellgebra.exec.FileWriterTaskBase
checkIfAbortHasBeenCalled, checkIfNew, getOutputPath, getState, isFinished, isStarted
-
Constructor Details
-
FileWriterTaskFromProcess
public FileWriterTaskFromProcess(Path outputPath, FileWriterTaskBase.PathLifeCycle pathLifeCycle, String... cmd)
-
-
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
-