@groovy.util.logging.Slf4j @groovy.transform.CompileStatic class Session extends java.lang.Object
Holds the information on the current execution
Type | Name and description |
---|---|
java.util.Collection<groovyx.gpars.dataflow.operator.DataflowProcessor> |
allOperators Keep a list of all processor created |
boolean |
ansiLog |
AnsiLogObserver |
ansiLogObserver |
java.nio.file.Path |
baseDir The folder where the main script is contained |
ScriptBinding |
binding Script binding |
ScriptBinding |
binding |
java.nio.file.Path |
bucketDir Bucket work directory for cloud based executors |
boolean |
cacheable Enable / disable tasks result caching |
java.lang.String |
commandLine |
java.util.Map |
config Holds the configuration object |
java.util.List<java.nio.file.Path> |
configFiles List files that concurrent on the session configuration |
ExecutorFactory |
executorFactory Creates process executors |
java.util.List<groovy.lang.Closure> |
igniters |
java.util.List<java.nio.file.Path> |
libDir Folder(s) containing libs and classes to be added to the classpath |
java.lang.String |
libDir |
java.lang.String |
profile |
java.lang.String |
resolvedConfig |
boolean |
resumeMode whenever it has been launched in resume mode |
java.lang.String |
runName Mnemonic name of this run instance |
BaseScript |
script The main script object |
java.lang.String |
scriptName The pipeline script name (without parent path) |
java.nio.file.Path |
workDir The folder where tasks temporary files are stored |
Type Params | Return Type | Name and description |
---|---|---|
|
void |
abort(java.lang.Throwable cause = null) Terminate the pipeline execution killing all running tasks |
|
void |
addIgniter(groovy.lang.Closure action) |
|
void |
await() Await the termination of all processors |
|
protected boolean |
checkValidProcessName(java.util.Collection<java.lang.String> processNames, java.lang.String selector, java.util.List<java.lang.String> errorMessage) Check that the specified name belongs to the list of existing process names |
|
void |
cleanup() Delete the workflow work directory from tasks temporary files |
|
void |
destroy() |
|
java.lang.String |
dumpNetworkStatus() Dump the current dataflow network listing the status of active processes and operators for debugging purpose |
|
void |
fault(TaskFault fault, TaskHandler handler = null) Halt the pipeline execution choosing exiting immediately or completing current pending task depending the chosen ErrorStrategy |
|
java.lang.Object |
fetchContainers() |
|
protected java.util.Map<java.lang.String, java.nio.file.Path> |
findBinEntries(java.nio.file.Path path) |
|
void |
fireDataflowNetwork() |
|
Barrier |
getBarrier() |
|
java.nio.file.Path |
getBinDir() The folder where script binaries file are located, by default the folder 'bin' in the script base directory |
|
java.util.Map<java.lang.String, java.nio.file.Path> |
getBinEntries() |
|
ScriptBinding |
getBinding() |
|
CacheDB |
getCache() |
|
java.lang.ClassLoader |
getClassLoader() |
|
java.nio.file.Path |
getClassesDir() |
|
java.lang.Object |
getConfigAttribute(java.lang.String name, java.lang.Object defValue) |
|
java.util.Map |
getConfigEnv() |
|
ContainerConfig |
getContainerConfig() @return A ContainerConfig object representing the container engine configuration defined in config object |
|
DAG |
getDag() |
|
java.util.List<java.lang.String> |
getDumpChannels() |
|
boolean |
getDumpHashes() |
|
java.lang.Throwable |
getError() |
|
java.lang.Object |
getExecConfigProp(java.lang.String execName, java.lang.String name, java.lang.Object defValue, java.util.Map env = null ) |
|
java.util.concurrent.ExecutorService |
getExecService() |
|
nextflow.util.Duration |
getExitReadTimeout(java.lang.String execName, nextflow.util.Duration defValue = Duration.of('90sec') Determines how long the executors waits before return an error status when a process is terminated but the exit file does not exist or it is empty. |
|
TaskFault |
getFault() |
|
FilePorter |
getFilePorter() |
|
java.util.concurrent.ExecutorService |
getFileTransferThreadPool() |
|
java.util.List<java.nio.file.Path> |
getLibDir() |
|
Manifest |
getManifest() |
|
nextflow.util.Duration |
getMonitorDumpInterval(java.lang.String execName, nextflow.util.Duration defValue = Duration.of('5min') Determines how often the executor status is written in the application log file |
|
ParamsMap |
getParams() |
|
nextflow.util.Duration |
getPollInterval(java.lang.String execName, nextflow.util.Duration defValue = Duration.of('1sec') Determines how often a poll occurs to check for a process termination |
|
int |
getPoolSize() @return The session max number of thread allowed |
|
int |
getQueueSize(java.lang.String execName, int defValue) Defines the number of tasks the executor will handle in a parallel manner |
|
nextflow.util.Duration |
getQueueStatInterval(java.lang.String execName, nextflow.util.Duration defValue = Duration.of('1min') Determines how often the queue status is fetched from the cluster system. |
|
boolean |
getStatsEnabled() |
|
protected java.util.Map<java.lang.String, java.lang.String> |
getSystemEnv() |
|
java.util.UUID |
getUniqueId() @return The current session java.util.UUID |
|
WorkflowMetadata |
getWorkflowMetadata() |
|
WorkflowStats |
getWorkflowStats() |
|
Session |
init(ScriptFile scriptFile, java.util.List<java.lang.String> args = null ) Initialize the session workDir, libDir, baseDir and scriptName variables |
|
boolean |
isAborted() |
|
boolean |
isCancelled() |
|
boolean |
isSuccess() |
|
boolean |
isTerminated() |
|
ProcessFactory |
newProcessFactory(BaseScript script) |
|
void |
notifyAfterWorkflowExecution() |
|
void |
notifyBeforeWorkflowExecution() |
|
void |
notifyError(TaskHandler handler) Notify a task failure |
|
void |
notifyFlowBegin() |
|
void |
notifyFlowComplete() |
|
void |
notifyFlowInit() |
|
void |
notifyProcessCreate(TaskProcessor process) |
|
void |
notifyProcessTerminate(TaskProcessor process) |
|
void |
notifyTaskCached(TaskHandler handler) |
|
void |
notifyTaskComplete(TaskHandler handler) Notifies task termination event |
|
void |
notifyTaskPending(TaskHandler handler) |
|
void |
notifyTaskStart(TaskHandler handler) Notifies task start event |
|
void |
notifyTaskSubmit(TaskHandler handler) Notifies that a task has been submitted |
|
void |
onError(groovy.lang.Closure action) Define the error event handler |
|
void |
onShutdown(groovy.lang.Closure shutdown) Register a shutdown hook to close services when the session terminates |
|
void |
printConsole(java.lang.String str, boolean newLine = false) |
|
void |
printConsole(java.nio.file.Path file) |
|
void |
processDeregister(TaskProcessor process) |
|
void |
processRegister(TaskProcessor process) |
|
protected java.lang.String |
resolveClosure(java.lang.Object val) Resolve dynamically defined attributes to the actual value |
|
void |
setBaseDir(java.nio.file.Path baseDir) |
|
Session |
setBinding(ScriptBinding binding) |
|
void |
setLibDir(java.lang.String str) |
|
protected void |
shutdown0() |
|
Session |
start() |
|
protected void |
validate() Check preconditions before run the main script |
|
void |
validateConfig(java.util.Collection<java.lang.String> processNames) Validate the config file |
|
protected java.util.List<java.lang.String> |
validateConfig0(java.util.Collection<java.lang.String> processNames) |
Methods inherited from class | Name |
---|---|
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Keep a list of all processor created
The folder where the main script is contained
Script binding
Bucket work directory for cloud based executors
Enable / disable tasks result caching
Holds the configuration object
List files that concurrent on the session configuration
Creates process executors
Folder(s) containing libs and classes to be added to the classpath
whenever it has been launched in resume mode
Mnemonic name of this run instance
The main script object
The pipeline script name (without parent path)
The folder where tasks temporary files are stored
Creates a new session with an 'empty' (default) configuration
Create a new session given the configuration specified
Terminate the pipeline execution killing all running tasks
cause
- A java.lang.Throwable instance representing the execution that caused the pipeline execution to abortAwait the termination of all processors
Check that the specified name belongs to the list of existing process names
selector
- The process name to checkprocessNames
- The list of processes declared in the workflow scripterrorMessage
- A list of strings used to return the error message to the callertrue
if the name specified belongs to the list of process names or false
otherwiseDelete the workflow work directory from tasks temporary files
Dump the current dataflow network listing the status of active processes and operators for debugging purpose
Halt the pipeline execution choosing exiting immediately or completing current pending task depending the chosen ErrorStrategy
fault
- A TaskFault instance representing the error that caused the pipeline to stopThe folder where script binaries file are located, by default the folder 'bin' in the script base directory
Determines how long the executors waits before return an error status when a process is terminated but the exit file does not exist or it is empty. This setting is used only by grid executors
execName
- The executor namedefValue
- The default value if setting is not defined in the configuration fileDuration
object. Default '90 second'Determines how often the executor status is written in the application log file
execName
- The executor namedefValue
- The default value if setting is not defined in the configuration fileDuration
object. Default '5 minutes'Determines how often a poll occurs to check for a process termination
execName
- The executor namedefValue
- The default value if setting is not defined in the configuration fileDuration
object. Default '1 second'
Defines the number of tasks the executor will handle in a parallel manner
execName
- The executor namedefValue
- The default value if setting is not defined in the configuration fileDetermines how often the queue status is fetched from the cluster system. This setting is used only by grid executors
execName
- The executor namedefValue
- The default value if setting is not defined in the configuration fileDuration
object. Default '1 minute'
Initialize the session workDir, libDir, baseDir and scriptName variables
Notify a task failure
Notifies task termination event
Notifies task start event
Notifies that a task has been submitted
Define the error event handler
Register a shutdown hook to close services when the session terminates
Resolve dynamically defined attributes to the actual value
val
- A process container definition either a plain string or a closureCheck preconditions before run the main script
Validate the config file
processNames
- The list of process names defined in the pipeline scriptGroovy Documentation