Package io.trino.tempto.process
Interface CliProcess
- All Superinterfaces:
AutoCloseable,Closeable
- All Known Implementing Classes:
CliProcessBase,LocalCliProcess
Interface for interacting with CLI processes.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanhasNextError(Pattern pattern) booleanbooleanbooleanhasNextOutput(Pattern pattern) booleanbooleanvoidWaits for a process to finish and ensures it returns with 0 status.voidwaitForWithTimeoutAndKill(Duration timeout)
-
Method Details
-
trimLines
-
readRemainingOutputLines
-
nextOutputLine
String nextOutputLine() -
nextOutputToken
String nextOutputToken() -
hasNextOutputLine
boolean hasNextOutputLine() -
hasNextOutput
-
hasNextOutputToken
boolean hasNextOutputToken() -
readRemainingErrorLines
-
nextErrorLine
String nextErrorLine() -
nextErrorToken
String nextErrorToken() -
hasNextErrorLine
boolean hasNextErrorLine() -
hasNextError
-
hasNextErrorToken
boolean hasNextErrorToken() -
getProcessInput
PrintStream getProcessInput() -
waitForWithTimeoutAndKill
void waitForWithTimeoutAndKill() throws InterruptedException, TimeoutRuntimeException, CommandExecutionExceptionWaits 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.- Throws:
InterruptedException- if the thread is interruptedCommandExecutionException- if command finishes with non zero statusTimeoutRuntimeException
-
waitForWithTimeoutAndKill
void waitForWithTimeoutAndKill(Duration timeout) throws InterruptedException, TimeoutRuntimeException, CommandExecutionException
-