public class LocalComputationManager extends java.lang.Object implements ComputationManager
Constructor and Description |
---|
LocalComputationManager() |
LocalComputationManager(java.util.concurrent.Executor executor) |
LocalComputationManager(LocalComputationConfig config) |
LocalComputationManager(LocalComputationConfig config,
java.util.concurrent.Executor executor) |
LocalComputationManager(LocalComputationConfig config,
LocalCommandExecutor localCommandExecutor,
java.util.concurrent.Executor executor) |
LocalComputationManager(java.nio.file.Path localDir) |
LocalComputationManager(PlatformConfig platformConfig) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
<R> java.util.concurrent.CompletableFuture<R> |
execute(ExecutionEnvironment environment,
ExecutionHandler<R> handler)
Submits for execution commands defined by the specified
ExecutionHandler ,
using the specified ExecutionEnvironment . |
<R> java.util.concurrent.CompletableFuture<R> |
execute(ExecutionEnvironment environment,
ExecutionHandler<R> handler,
ComputationParameters parameters)
Submits for execution commands defined by the specified
ExecutionHandler ,
using the specified ExecutionEnvironment . |
static ComputationManager |
getDefault() |
java.util.concurrent.Executor |
getExecutor()
An executor which may be used to perform expensive processing inside this JVM.
|
java.nio.file.Path |
getLocalDir() |
ComputationResourcesStatus |
getResourcesStatus() |
java.lang.String |
getVersion() |
java.io.OutputStream |
newCommonFile(java.lang.String fileName) |
public LocalComputationManager() throws java.io.IOException
java.io.IOException
public LocalComputationManager(java.util.concurrent.Executor executor) throws java.io.IOException
java.io.IOException
public LocalComputationManager(PlatformConfig platformConfig) throws java.io.IOException
java.io.IOException
public LocalComputationManager(java.nio.file.Path localDir) throws java.io.IOException
java.io.IOException
public LocalComputationManager(LocalComputationConfig config) throws java.io.IOException
java.io.IOException
public LocalComputationManager(LocalComputationConfig config, java.util.concurrent.Executor executor) throws java.io.IOException
java.io.IOException
public LocalComputationManager(LocalComputationConfig config, LocalCommandExecutor localCommandExecutor, java.util.concurrent.Executor executor) throws java.io.IOException
java.io.IOException
public static ComputationManager getDefault()
public java.lang.String getVersion()
getVersion
in interface ComputationManager
public java.nio.file.Path getLocalDir()
getLocalDir
in interface ComputationManager
public java.io.OutputStream newCommonFile(java.lang.String fileName) throws java.io.IOException
newCommonFile
in interface ComputationManager
java.io.IOException
public <R> java.util.concurrent.CompletableFuture<R> execute(ExecutionEnvironment environment, ExecutionHandler<R> handler)
ComputationManager
ExecutionHandler
,
using the specified ExecutionEnvironment
.
The result of type R
will be provided asynchronously through the returned CompletableFuture
.
execute
in interface ComputationManager
R
- the type of the result expected from the commands execution.environment
- specifies environment details such as the working directory prefix and environment variables.handler
- defines the commands to be executed together with preprocessing and postprocessing.public <R> java.util.concurrent.CompletableFuture<R> execute(ExecutionEnvironment environment, ExecutionHandler<R> handler, ComputationParameters parameters)
ComputationManager
ExecutionHandler
,
using the specified ExecutionEnvironment
.
The result of type R
will be provided asynchronously through the returned CompletableFuture
.
Additional technical parameters may be provided through the ComputationParameters
.
execute
in interface ComputationManager
R
- the type of the result expected from the commands execution.environment
- specifies environment details such as the working directory prefix and environment variables.handler
- defines the commands to be executed together with preprocessing and postprocessing.parameters
- defines additional technical parameterspublic ComputationResourcesStatus getResourcesStatus()
getResourcesStatus
in interface ComputationManager
public java.util.concurrent.Executor getExecutor()
ComputationManager
getExecutor
in interface ComputationManager
public void close()
close
in interface ComputationManager
close
in interface java.lang.AutoCloseable