Interface Plugin.Engine.Dispatcher
- All Superinterfaces:
AutoCloseable, Closeable
- All Known Implementing Classes:
Plugin.Engine.Dispatcher.ForParallelTransformation, Plugin.Engine.Dispatcher.ForParallelTransformation.WithThrowawayExecutorService, Plugin.Engine.Dispatcher.ForSerialTransformation
- Enclosing interface:
Plugin.Engine
A dispatcher to execute a plugin engine transformation. A dispatcher will receive all work assignments prior to the invocation
of complete. After registering and eventually completing the supplied work, the close method will always be called. Any dispatcher
will only be used once and from a single thread.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceA factory that is used for creating a dispatcher that is used for a specific plugin engine application.static classA dispatcher that applies transformations within one or more threads in parallel to the default transformer.static classA dispatcher that applies transformation upon discovery.static interfaceThe result of a work assignment that needs to be invoked from the main thread that triggers a dispatchers life-cycle methods. -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(Callable<? extends Callable<? extends Plugin.Engine.Dispatcher.Materializable>> work, boolean eager) Accepts a new work assignment.voidcomplete()Completes the work being handled.
-
Method Details
-
accept
void accept(Callable<? extends Callable<? extends Plugin.Engine.Dispatcher.Materializable>> work, boolean eager) throws IOException Accepts a new work assignment.- Parameters:
work- The work to handle prefixed by a preprocessing step.eager-trueif the processing does not need to be deferred until all preprocessing is complete.- Throws:
IOException- If an I/O exception occurs.
-
complete
Completes the work being handled.- Throws:
IOException- If an I/O exception occurs.
-