Class HotFileFromProcess
java.lang.Object
org.aksw.jena_sparql_api.io.filter.sys.HotFileFromProcess
- All Implemented Interfaces:
org.aksw.commons.io.endpoint.FileCreation,HotFile
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected io.reactivex.rxjava3.disposables.Disposableprotected Pathprotected CompletableFuture<Path>protected Channel -
Constructor Summary
ConstructorsConstructorDescriptionHotFileFromProcess(Path path, io.reactivex.rxjava3.core.Single<Integer> processSingle) -
Method Summary
Modifier and TypeMethodDescriptionvoidabort()static HotFileFromProcesscreateStarted(Path hotFile, io.reactivex.rxjava3.core.Single<Integer> processSingle) Calling this method will subscribe to the single (on Schedulers.io()) and thus start its attached processfuture()voidstatic voidOpen a new stream to the hot file The input stream delivery may be delayed until after the file creation is complete.toString()
-
Field Details
-
path
-
writeChannel
-
disposable
protected io.reactivex.rxjava3.disposables.Disposable disposable -
resultFuture
-
-
Constructor Details
-
HotFileFromProcess
-
-
Method Details
-
createStarted
public static HotFileFromProcess createStarted(Path hotFile, io.reactivex.rxjava3.core.Single<Integer> processSingle) Calling this method will subscribe to the single (on Schedulers.io()) and thus start its attached process- Parameters:
hotFile- The file being written toprocessSingle- The single capturing the process- Returns:
-
abort
public void abort()- Specified by:
abortin interfaceorg.aksw.commons.io.endpoint.FileCreation
-
init
- Parameters:
path- The path being written to by the processprocessSingle- A cold single wrapping the process and yielding its exit code
-
future
- Specified by:
futurein interfaceorg.aksw.commons.io.endpoint.FileCreation
-
newInputStream
Description copied from interface:HotFileOpen a new stream to the hot file The input stream delivery may be delayed until after the file creation is complete. TODO Add a flag to hint the methods behavior- Specified by:
newInputStreamin interfaceHotFile- Returns:
- Throws:
IOException
-
main
- Throws:
InterruptedExceptionIOException
-
toString
-