Class ExecutionQueueModule
- All Implemented Interfaces:
IModule
,ModuleElement
,IEolModule
Dummy module intended to allow the reuse of a single
EpsilonDebugServer
across multiple Epsilon programs. Users should
call the enqueue(IEolModule)
method to add more programs to be
debugged, which will be executed in FIFO order.
The module will run indefinitely until it is terminated, running every enqueued module and waiting when all modules have been executed so far, until more modules are enqueued or execution is terminated.
The module can automatically attach the modules to be run to a given adapter,
if set via setDebugAdapter(EpsilonDebugAdapter)
.
This is recommended, as otherwise there is a risk that certain events will be
missed by the debug adapter (e.g. the pre-execute checks for the root of its AST).
The queue is polled according to a given interval, configured via
setPollInterval(Duration)
(which should be measured at least
in milliseconds).
-
Field Summary
FieldsFields inherited from class org.eclipse.epsilon.eol.EolModule
context, declaredModelDeclarations, declaredOperations, imports, main, modelDeclarations, operations, postOperationStatements
Fields inherited from class org.eclipse.epsilon.eol.AbstractModule
parseProblems, parser, sourceFile, sourceUri
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionenqueue
(IEolModule module) Adds a module to the end of the queue of modules to be executed.void
setDebugAdapter
(EpsilonDebugAdapter debugAdapter) void
setPollInterval
(Duration pollInterval) Methods inherited from class org.eclipse.epsilon.eol.EolModule
adapt, build, clearCache, createDebugger, createLexer, createParser, execute, getContext, getDeclaredModelDeclarations, getDeclaredOperations, getImportConfiguration, getImportManager, getImports, getMain, getMainRule, getModelDeclarations, getOperations, getParentModule, getPostOperationStatements, loadImports, prepareContext, setContext, setImportManager, setMain, setParentModule, toString
Methods inherited from class org.eclipse.epsilon.eol.AbstractModule
assignAnnotations, assignComment, assignComments, createAst, extractComments, getParseProblems, getSourceFile, getSourceUri, invokeMainRule, parse, parse
Methods inherited from class org.eclipse.epsilon.common.module.AbstractModuleElement
equals, getChildren, getComments, getData, getDebugInfo, getFile, getModule, getParent, getRegion, getUri, hashCode, setModule, setParent, setRegion, setUri
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.eclipse.epsilon.eol.IEolModule
configure, getConfigurationProperties, getParseProblems, parse
Methods inherited from interface org.eclipse.epsilon.common.module.IModule
createAst, getSourceUri, parse, parse, parse, parse, parse
Methods inherited from interface org.eclipse.epsilon.common.module.ModuleElement
getChildren, getComments, getData, getFile, getModule, getParent, getRegion, getUri, setModule, setParent, setRegion, setUri
-
Field Details
-
DEFAULT_DURATION
-
-
Constructor Details
-
ExecutionQueueModule
public ExecutionQueueModule()
-
-
Method Details
-
enqueue
Adds a module to the end of the queue of modules to be executed.- Returns:
- A
Future
which will eventually contain the execution result of the enqueued module.
-
executeImpl
- Overrides:
executeImpl
in classEolModule
- Throws:
EolRuntimeException
-
getPollInterval
-
setPollInterval
-
getDebugAdapter
-
setDebugAdapter
-