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: 65.0.19510.3242 (65.0.19510.3242)
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.
Properties
Name | Description | |
---|---|---|
MaxBatchSize | Gets or sets the maximum batch size.
The default value is 1.
(Inherited from Worker.) |
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.
| |
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetHashCode | Serves as the default hash function. (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.) | |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
Version Information
Supported in: 14.3, 14.2, 14.1, 14.0, 12.5, 12.4, 12.3, 12.2, 12.1, 12.0, 11.8
See Also