Package org.aksw.shellgebra.exec
Class FileWriterTaskViaExecutor
java.lang.Object
org.aksw.shellgebra.exec.FileWriterTaskBase
org.aksw.shellgebra.exec.FileWriterTaskViaExecutor
- All Implemented Interfaces:
AutoCloseable,FileWriterTask
- Direct Known Subclasses:
FileWriterTaskFromByteSource,FileWriterTaskFromProcess
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.aksw.shellgebra.exec.FileWriterTaskBase
FileWriterTaskBase.PathLifeCycle, FileWriterTaskBase.TaskState -
Field Summary
FieldsFields inherited from class org.aksw.shellgebra.exec.FileWriterTaskBase
isAbortCalled, outputPath, pathLifeCycle, state -
Constructor Summary
ConstructorsConstructorDescriptionFileWriterTaskViaExecutor(Path path, FileWriterTaskBase.PathLifeCycle pathLifeCycle) -
Method Summary
Modifier and TypeMethodDescriptionfinal voidabort()Requests abort of currently running task or prevents its execution if it hasn't started yet.protected abstract voidfinal voidclose()protected voidprotected voidCalled on completion - regardless whether successful or not.final voidstart()toString()voidMethods inherited from class org.aksw.shellgebra.exec.FileWriterTaskBase
checkIfAbortHasBeenCalled, checkIfNew, getOutputPath, getState, isFinished, isStarted, prepareWriteFile, runWriteFile
-
Field Details
-
lock
-
-
Constructor Details
-
FileWriterTaskViaExecutor
-
-
Method Details
-
start
public final void start() -
waitForCompletion
- Specified by:
waitForCompletionin interfaceFileWriterTask- Specified by:
waitForCompletionin classFileWriterTaskBase- Throws:
InterruptedExceptionExecutionException
-
abort
public final void abort()Requests abort of currently running task or prevents its execution if it hasn't started yet. Aborting a completed task has no effect.- Specified by:
abortin interfaceFileWriterTask- Specified by:
abortin classFileWriterTaskBase
-
abortActual
protected abstract void abortActual() -
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).- Specified by:
onCompletionin classFileWriterTaskBase- Throws:
IOException
-
close
- Throws:
Exception
-
closeActual
- Throws:
Exception
-
toString
-