ThreadQueueWorkerTItem, TWorker Class |
Namespace: CMS.Base
public abstract class ThreadQueueWorker<TItem, TWorker> : ThreadWorker<TWorker> where TItem : class where TWorker : new(), ThreadQueueWorker<TItem, TWorker>
The ThreadQueueWorkerTItem, TWorker type exposes the following members.
Name | Description | |
---|---|---|
ThreadQueueWorkerTItem, TWorker |
Name | Description | |
---|---|---|
ClearQueue |
Clears the current queue
| |
CreateThread |
Creates a worker thread object. Override to modify the thread configuration
(Inherited from ThreadWorkerT.) | |
Dequeue |
Returns the first item in the queue and removes it
| |
DoMaintenance |
Runs the maintenance routine for the worker
(Inherited from ThreadWorkerT.) | |
Enqueue |
Adds new item to processing queue
| |
Finish |
Finishes the worker process. Implement this method to specify what the worker must do in order to not lose its internal data when being finished. Leave empty if no extra action is required.
(Inherited from ThreadWorkerT.) | |
Initialize |
Initializes the worker. Runs in the worker thread before the thread processes the first iteration.
(Inherited from ThreadWorkerT.) | |
Process |
Method processing queues actions.
(Overrides ThreadWorkerTProcess.) | |
ProcessItem |
Processes the item in the queue. Override this method to process a single item from the queue.
| |
ProcessItems |
Processes the given list of items. Override this method to process queued items as a bulk. Returns the number of processed items.
| |
RegisterInternal |
Registers the worker
(Inherited from ThreadWorkerT.) | |
ResetInternal |
Resets the worker and clears the queue
(Overrides ThreadWorkerTResetInternal.) | |
Run |
Runs the action.
(Inherited from ThreadWorkerT.) | |
RunAsync |
Runs the task in an asynchronous thread.
(Inherited from ThreadWorkerT.) | |
RunMaintenance |
Runs the maintenance routine for the worker if it should run.
(Inherited from ThreadWorkerT.) | |
RunProcess |
Runs the internal process of the worker
(Inherited from ThreadWorkerT.) |
Name | Description | |
---|---|---|
AsValue |
Converts object to a query value which can be used as a query parameter
(Defined by QueryExtensions.) | |
GetAPIString |
Gets the string by the specified resource key
(Defined by CoreExtensions.) | |
GetString |
Gets the string by the specified resource key
(Defined by CoreExtensions.) | |
ToBoolean |
Returns the boolean representation of an object or default value if not.
(Defined by CoreExtensions.) | |
ToDateTime |
Returns the DateTime representation of an object or default value if not.
(Defined by CoreExtensions.) | |
ToDouble |
Returns the double representation of an object or default value if not.
(Defined by CoreExtensions.) | |
ToGuid |
Returns the Guid representation of an object or default value if not.
(Defined by CoreExtensions.) | |
ToInteger |
Returns the integer representation of an object or default value if not.
(Defined by CoreExtensions.) | |
ToString |
Returns the string representation of an object or default value if not.
(Defined by CoreExtensions.) |
Name | Description | |
---|---|---|
DefaultInterval |
Gets the default interval in milliseconds for the worker.
(Inherited from ThreadWorkerT.) | |
CheckDuplicity |
If true, the queue checks the duplicity when inserting items. The duplicity is checked using the default comparer of the item.
| |
ItemsInQueue |
Return the current number of items in the queue
| |
LastRun |
Last run time
(Inherited from ThreadWorkerT.) | |
MaintenanceInterval |
Gets the maintenance interval in milliseconds for the worker. When 0 (default), the maintenance is not performed.
(Inherited from ThreadWorkerT.) | |
NextMaintenance |
Next maintenance time
(Inherited from ThreadWorkerT.) | |
PollThread |
Gets or sets thread which is periodically checking for new tasks.
(Inherited from ThreadWorkerT.) | |
ProcessingPaused |
If set to true, tasks from queue will not be processed.
| |
UseLogContext |
If true, the thread uses a log context for its operations
(Inherited from ThreadWorkerT.) |