compbio.engine.client
Class ConfExecutable<T>
java.lang.Object
compbio.engine.client.ConfExecutable<T>
- All Implemented Interfaces:
- ConfiguredExecutable<T>, Executable<T>, PipedExecutable<T>
public class ConfExecutable<T>
- extends java.lang.Object
- implements ConfiguredExecutable<T>
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
CLUSTER_TASK_ID_PREFIX
public static final java.lang.String CLUSTER_TASK_ID_PREFIX
- See Also:
- Constant Field Values
ConfExecutable
public ConfExecutable(Executable<T> executable,
java.lang.String taskDirectory)
getExecProvider
public Executable.ExecProvider getExecProvider()
- Specified by:
getExecProvider
in interface ConfiguredExecutable<T>
setExecProvider
public void setExecProvider(Executable.ExecProvider provider)
getCommand
public java.lang.String getCommand(Executable.ExecProvider provider)
throws UnsupportedRuntimeException
- Specified by:
getCommand
in interface ConfiguredExecutable<T>
- Throws:
UnsupportedRuntimeException
getSupportedRuntimes
public Executable.ExecProvider getSupportedRuntimes()
- Specified by:
getSupportedRuntimes
in interface ConfiguredExecutable<T>
getLimit
public Limit<T> getLimit(java.lang.String presetName)
- Specified by:
getLimit
in interface Executable<T>
getLimits
public LimitsManager<T> getLimits()
- Specified by:
getLimits
in interface Executable<T>
getTaskId
public java.lang.String getTaskId()
- Specified by:
getTaskId
in interface ConfiguredExecutable<T>
setWorkDirectory
public void setWorkDirectory(java.lang.String workDirectory)
- Specified by:
setWorkDirectory
in interface ConfiguredExecutable<T>
getWorkDirectory
public java.lang.String getWorkDirectory()
- Specified by:
getWorkDirectory
in interface ConfiguredExecutable<T>
addParameters
public Executable<T> addParameters(java.util.List<java.lang.String> parameters)
- Description copied from interface:
Executable
- Adds parameter to the list of parameters for a native executable
- Specified by:
addParameters
in interface Executable<T>
- Returns:
- this Executable
getOutput
public java.lang.String getOutput()
- Specified by:
getOutput
in interface Executable<T>
getError
public java.lang.String getError()
- Specified by:
getError
in interface Executable<T>
getCreatedFiles
public java.util.List<java.lang.String> getCreatedFiles()
- Specified by:
getCreatedFiles
in interface Executable<T>
getInput
public java.lang.String getInput()
- Not all input paths are relative! Input path could be absolute!
- Specified by:
getInput
in interface Executable<T>
- See Also:
compbio.engine.client.Executable#getInputFiles()
getParameters
public CommandBuilder<T> getParameters()
- Specified by:
getParameters
in interface ConfiguredExecutable<T>
getParameters
public CommandBuilder<T> getParameters(Executable.ExecProvider provider)
- Specified by:
getParameters
in interface Executable<T>
getExecutable
public Executable<T> getExecutable()
- Specified by:
getExecutable
in interface ConfiguredExecutable<T>
getResults
public <V> V getResults()
throws ResultNotAvailableException
- Specified by:
getResults
in interface ConfiguredExecutable<T>
- Throws:
ResultNotAvailableException
getResults
public <V> V getResults(java.lang.String directory)
throws ResultNotAvailableException
- Specified by:
getResults
in interface Executable<T>
- Throws:
ResultNotAvailableException
getRunnerOptions
public static <V> RunnerConfig<V> getRunnerOptions(java.lang.Class<? extends Executable<V>> clazz)
throws java.io.IOException
- Throws:
java.io.IOException
getRunnerPresets
public static <V> PresetManager<V> getRunnerPresets(java.lang.Class<? extends Executable<V>> clazz)
throws java.io.IOException
- Throws:
java.io.IOException
getRunnerLimits
public static <V> LimitsManager<V> getRunnerLimits(java.lang.Class<V> clazz)
throws java.io.IOException
- This method should be executed once and result of its execution reused.
If not used carefully it could slow down the system!
- Type Parameters:
V
- - Parameters:
clazz
-
- Returns:
- LimitsManager instance
- Throws:
java.io.IOException
getEnvironment
public java.util.Map<java.lang.String,java.lang.String> getEnvironment()
- Specified by:
getEnvironment
in interface ConfiguredExecutable<T>
loadRunConfiguration
public ConfiguredExecutable<?> loadRunConfiguration(RunConfiguration rconf)
- Specified by:
loadRunConfiguration
in interface Executable<T>
newConfExecutable
public static ConfiguredExecutable<?> newConfExecutable(RunConfiguration rconf)
saveRunConfiguration
public boolean saveRunConfiguration()
throws java.io.IOException
- Specified by:
saveRunConfiguration
in interface ConfiguredExecutable<T>
- Throws:
java.io.IOException
getRunConfiguration
public RunConfiguration getRunConfiguration()
loadRunConfiguration
public ConfiguredExecutable<?> loadRunConfiguration(java.io.InputStream input)
throws java.io.IOException
- Specified by:
loadRunConfiguration
in interface ConfiguredExecutable<T>
- Throws:
java.io.IOException
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
getClusterJobSettings
public java.lang.String getClusterJobSettings()
- Specified by:
getClusterJobSettings
in interface Executable<T>