public class ScriptCompilerQueue extends Object
Queue managing script compilation requests from the GUI (since 4.4.4). It ensures synchronization and efficiency of script compilation triggered by:
Queue architecture:
force
parameter is set to
true
.T-Plan Robot Enterprise, (C) 2009-2022 T-Plan Limited. All rights reserved.
Modifier and Type | Method and Description |
---|---|
static void |
compile(TestScriptInterpret script,
ScriptingContext context,
ActionListener a,
boolean force)
Request a new compilation.
|
static boolean |
isQueueEnabled()
Test out whether the queue is enabled, i.e.
|
static void |
start()
Start accepting the compile requests.
|
static void |
stop(int maxWaitMs)
Stop accepting the compile requests.
|
public static boolean isQueueEnabled()
public static void start()
public static void stop(int maxWaitMs)
maxWaitMs
- how long to wait for all queued compiler tasks to finish
at a maximum (milliseconds). Use a value <= 0 to set off waiting.public static void compile(TestScriptInterpret script, ScriptingContext context, ActionListener a, boolean force)
script
- the test script.context
- a custom context instance. Use null
to let
the process create a new context and make it available through
TestScriptInterpret.getCompilationContext()
.a
- an optional action listener to be notified after the request is
completed (i.e. either skipped or compiled).force
- the value of true
will terminate any eventual
running compilation process before starting a new one. The value of
false
will skip the compilation if the script is already
being compiled.