Package com.powsybl.security.distributed
Class SecurityAnalysisExecutionHandlers
- java.lang.Object
-
- com.powsybl.security.distributed.SecurityAnalysisExecutionHandlers
-
public final class SecurityAnalysisExecutionHandlers extends Object
Factory methods for security analysis execution handlers.- Author:
- Sylvain Leclerc
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ExecutionHandler<SecurityAnalysisResult>
distributed(SecurityAnalysisExecutionInput input, int subtaskCount)
Create anExecutionHandler
which distributes the security analysis execution through multiple calls to itools security-analysis, as specified in argument.static void
distributedOptions(Path workingDir, SecurityAnalysisCommandOptions options, int taskCount)
static ExecutionHandler<SecurityAnalysisResultWithLog>
distributedWithLog(SecurityAnalysisExecutionInput input, int subtaskCount)
Create anExecutionHandler
which distributes the security analysis execution through multiple calls to itools security-analysis, as specified in argument.static void
distributedWithLogsOptions(Path workingDir, SecurityAnalysisCommandOptions options, int taskCount)
static ExecutionHandler<SecurityAnalysisResult>
forwarded(SecurityAnalysisExecutionInput input)
Create anExecutionHandler
which forwards the security analysis execution through a call to itools security-analysis.static ExecutionHandler<SecurityAnalysisResult>
forwarded(SecurityAnalysisExecutionInput input, Integer forwardedTaskCount)
Create anExecutionHandler
which forwards the security analysis execution through a call to itools security-analysis, with the option --task-count.static void
forwardedOptions(Path workingDir, SecurityAnalysisCommandOptions options, Integer taskCount)
static ExecutionHandler<SecurityAnalysisResultWithLog>
forwardedWithLogs(SecurityAnalysisExecutionInput input)
Create anExecutionHandler
which forwards the security analysis execution through a call to itools security-analysis.static ExecutionHandler<SecurityAnalysisResultWithLog>
forwardedWithLogs(SecurityAnalysisExecutionInput input, Integer forwardedTaskCount)
Create anExecutionHandler
which forwards the security analysis execution through a call to itools security-analysis, with the option --task-count.static void
forwardedWithLogsOptions(Path workingDir, SecurityAnalysisCommandOptions options, Integer taskCount)
static Path
getLogPath(Path workingDir)
static Path
getLogPathForTask(Path workingDir, int taskNumber)
static Path
getOutputPathForTask(Path workingDir, int taskIndex)
static SecurityAnalysisResult
readResults(Path workingDir, int subtaskCount)
static SecurityAnalysisResultWithLog
readResultsWithLogs(Path workingDir, int subtaskCount)
static SecurityAnalysisResult
readSingleResult(Path workingDir)
static SecurityAnalysisResultWithLog
readSingleResultWithLogs(Path workingDir)
-
-
-
Method Detail
-
forwarded
public static ExecutionHandler<SecurityAnalysisResult> forwarded(SecurityAnalysisExecutionInput input)
Create anExecutionHandler
which forwards the security analysis execution through a call to itools security-analysis.
-
forwarded
public static ExecutionHandler<SecurityAnalysisResult> forwarded(SecurityAnalysisExecutionInput input, Integer forwardedTaskCount)
Create anExecutionHandler
which forwards the security analysis execution through a call to itools security-analysis, with the option --task-count.
-
forwardedWithLogs
public static ExecutionHandler<SecurityAnalysisResultWithLog> forwardedWithLogs(SecurityAnalysisExecutionInput input)
Create anExecutionHandler
which forwards the security analysis execution through a call to itools security-analysis. It also retrieves execution logs.
-
forwardedWithLogs
public static ExecutionHandler<SecurityAnalysisResultWithLog> forwardedWithLogs(SecurityAnalysisExecutionInput input, Integer forwardedTaskCount)
Create anExecutionHandler
which forwards the security analysis execution through a call to itools security-analysis, with the option --task-count. It also retrieves execution logs.
-
distributed
public static ExecutionHandler<SecurityAnalysisResult> distributed(SecurityAnalysisExecutionInput input, int subtaskCount)
Create anExecutionHandler
which distributes the security analysis execution through multiple calls to itools security-analysis, as specified in argument.
-
distributedWithLog
public static ExecutionHandler<SecurityAnalysisResultWithLog> distributedWithLog(SecurityAnalysisExecutionInput input, int subtaskCount)
Create anExecutionHandler
which distributes the security analysis execution through multiple calls to itools security-analysis, as specified in argument. It also retrieves execution logs.
-
readSingleResult
public static SecurityAnalysisResult readSingleResult(Path workingDir)
-
readSingleResultWithLogs
public static SecurityAnalysisResultWithLog readSingleResultWithLogs(Path workingDir)
-
forwardedOptions
public static void forwardedOptions(Path workingDir, SecurityAnalysisCommandOptions options, Integer taskCount)
-
forwardedWithLogsOptions
public static void forwardedWithLogsOptions(Path workingDir, SecurityAnalysisCommandOptions options, Integer taskCount)
-
distributedOptions
public static void distributedOptions(Path workingDir, SecurityAnalysisCommandOptions options, int taskCount)
-
distributedWithLogsOptions
public static void distributedWithLogsOptions(Path workingDir, SecurityAnalysisCommandOptions options, int taskCount)
-
readResults
public static SecurityAnalysisResult readResults(Path workingDir, int subtaskCount)
-
readResultsWithLogs
public static SecurityAnalysisResultWithLog readResultsWithLogs(Path workingDir, int subtaskCount)
-
-