Package io.trino.tempto.internal.process
Class CliProcessBase
java.lang.Object
io.trino.tempto.internal.process.CliProcessBase
- All Implemented Interfaces:
CliProcess,Closeable,AutoCloseable
- Direct Known Subclasses:
LocalCliProcess
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCliProcessBase(InputStream processOutput, InputStream processError, OutputStream processInput) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()booleanhasNextError(Pattern pattern) booleanbooleanbooleanhasNextOutput(Pattern pattern) booleanbooleanvoidWaits for a process to finish and ensures it returns with 0 status.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.trino.tempto.process.CliProcess
waitForWithTimeoutAndKill
-
Constructor Details
-
CliProcessBase
protected CliProcessBase(InputStream processOutput, InputStream processError, OutputStream processInput)
-
-
Method Details
-
readRemainingOutputLines
- Specified by:
readRemainingOutputLinesin interfaceCliProcess
-
nextOutputLine
- Specified by:
nextOutputLinein interfaceCliProcess
-
nextOutputToken
- Specified by:
nextOutputTokenin interfaceCliProcess
-
hasNextOutputLine
public boolean hasNextOutputLine()- Specified by:
hasNextOutputLinein interfaceCliProcess
-
hasNextOutput
- Specified by:
hasNextOutputin interfaceCliProcess
-
hasNextOutputToken
public boolean hasNextOutputToken()- Specified by:
hasNextOutputTokenin interfaceCliProcess
-
readRemainingErrorLines
- Specified by:
readRemainingErrorLinesin interfaceCliProcess
-
nextErrorLine
- Specified by:
nextErrorLinein interfaceCliProcess
-
nextErrorToken
- Specified by:
nextErrorTokenin interfaceCliProcess
-
hasNextErrorLine
public boolean hasNextErrorLine()- Specified by:
hasNextErrorLinein interfaceCliProcess
-
hasNextError
- Specified by:
hasNextErrorin interfaceCliProcess
-
hasNextErrorToken
public boolean hasNextErrorToken()- Specified by:
hasNextErrorTokenin interfaceCliProcess
-
getProcessInput
- Specified by:
getProcessInputin interfaceCliProcess
-
waitForWithTimeoutAndKill
Description copied from interface:CliProcessWaits for a process to finish and ensures it returns with 0 status. If the process fails to finish within given timeout it is killed andTimeoutRuntimeExceptionis thrown.- Specified by:
waitForWithTimeoutAndKillin interfaceCliProcess- Throws:
InterruptedException- if the thread is interrupted
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-