Generic base class for workers.
To create a custom worker, inherit from CustomWorker and implement either DoWorkCore or DoBatchWorkCore
Inheritance Hierarchy
Spotfire.Dxp.Framework.ThreadingWorker
Spotfire.Dxp.Framework.ThreadingWorkerTModel, TItem
Spotfire.Dxp.Application.ExtensionCustomWorkerTModel, TItem
Spotfire.Dxp.Data.VirtualColumnsVirtualValueWorkerTModel
Namespace: Spotfire.Dxp.Framework.Threading
Assembly: Spotfire.Dxp.Framework (in Spotfire.Dxp.Framework.dll) Version: 30.0.10915.3380 (30.0.10915.3380)
Syntax
C#
public abstract class Worker<TModel, TItem> : Worker where TModel : DocumentNode where TItem : WorkItem
Type Parameters
- TModel
- WorkerModel type.
- TItem
- WorkItem type.
The WorkerTModel, TItem type exposes the following members.
Methods
Name | Description | |
---|---|---|
Cancel | Cancel the work item.
| |
CreateBatchPredicateCore | Override to customize how work items are selected for batch work.
The default implementation returns null, which selects all work items.
| |
Dispose | Override this method to clean up resources.
(Inherited from Worker.) | |
DoBatchWorkCore | Override this method to handle a batch of work items at a time.
You must call ReturnItem for each work item in the batch.
The default implementation calls DoWorkCore(TModel, TItem) followed by ReturnItem for each work item.
| |
DoWorkCore | Override this method to handle a single work item at a time.
This method is called by DoBatchWorkCore.
The default implementation does nothing.
| |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetServiceTService |
Gets the service of the given type. This method provides access to
services on the analysis application level and upwards.
| |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
Properties
Name | Description | |
---|---|---|
MaxBatchSize | Gets or sets the maximum batch size.
The default value is 1.
(Inherited from Worker.) |
Version Information
See Also