Package com.powsybl.computation.local
Class AbstractLocalCommandExecutor
- java.lang.Object
-
- com.powsybl.computation.local.AbstractLocalCommandExecutor
-
- All Implemented Interfaces:
LocalCommandExecutor
- Direct Known Subclasses:
UnixLocalCommandExecutor
,WindowsLocalCommandExecutor
public abstract class AbstractLocalCommandExecutor extends Object implements LocalCommandExecutor
-
-
Field Summary
Fields Modifier and Type Field Description protected ReadWriteLock
lock
protected static String
NON_ZERO_LOG_PATTERN
protected Map<Path,Process>
processMap
-
Constructor Summary
Constructors Constructor Description AbstractLocalCommandExecutor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected int
execute(List<String> cmdLs, Path workingDir, Path outFile, Path errFile, long timeout)
void
stop(Path workingDir)
void
stopForcibly(Path workingDir)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.powsybl.computation.local.LocalCommandExecutor
execute, execute
-
-
-
-
Field Detail
-
lock
protected final ReadWriteLock lock
-
NON_ZERO_LOG_PATTERN
protected static final String NON_ZERO_LOG_PATTERN
- See Also:
- Constant Field Values
-
-
Method Detail
-
stop
public void stop(Path workingDir)
- Specified by:
stop
in interfaceLocalCommandExecutor
-
stopForcibly
public void stopForcibly(Path workingDir) throws InterruptedException
- Specified by:
stopForcibly
in interfaceLocalCommandExecutor
- Throws:
InterruptedException
-
execute
protected int execute(List<String> cmdLs, Path workingDir, Path outFile, Path errFile, long timeout) throws IOException, InterruptedException
- Throws:
IOException
InterruptedException
-
-