WorkDispatcherTItem Class TIBCO Spotfire 7.6 API Reference
Allows work items to be queued and sent to a worker for processing. A work dispatcher is created by the work manager service.
Inheritance Hierarchy

SystemObject
  Spotfire.Dxp.Framework.ThreadingWorkDispatcher
    Spotfire.Dxp.Framework.ThreadingWorkDispatcherTItem

Namespace: Spotfire.Dxp.Framework.Threading
Assembly: Spotfire.Dxp.Framework (in Spotfire.Dxp.Framework.dll) Version: 25.11.10401.3615 (25.11.10401.3615)
Syntax

C#
public sealed class WorkDispatcher<TItem> : WorkDispatcher
where TItem : WorkItem

Type Parameters

TItem
WorkItem type.

The WorkDispatcherTItem type exposes the following members.

Methods

  NameDescription
Public methodAddFirst
Adds the item to the front of the queue.
Public methodAddLast
Adds the item to the back of the queue.
Public methodAddWorkerModelChangedHandler
Adds a handler for the worker model changed event. If AutoCancel is true, all currently dispatched work items are canceled before this event is raised. The callee would typically invalidate any stored work results, and dispatch new work items when needed. The event can be raised on any thread.
Public methodCancel(IEnumerableTItem)
Cancel the specified work items.
Public methodCancel(TItem)
Cancel the work item.
Public methodCancelAll
Cancel all work items.
(Inherited from WorkDispatcher.)
Public methodDispose
Cancels all work items and frees up resources.
(Inherited from WorkDispatcher.)
Public methodExecuteSynchronously
Executes the item synchronously. This method is suitable when forced to execute items one by one and access the result synchronously.
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetItems
Gets the work items that are currently waiting to be dispatched.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodRemoveWorkerModelChangedHandler
Removes a handler for the worker model changed event.
Public methodSetItems
Sets the items to be dispatched. The first item will be dispatched first.
Public methodWaitAll
Waits until all items have been processed.
Top
Properties

  NameDescription
Public propertyAutoCancel
Gets or sets a value indicating whether worker model changes should automatically cancel added work items. The default value is true.
(Inherited from WorkDispatcher.)
Public propertyAutoDisposeItems
Gets or sets a value indicating whether work items should be automatically disposed. The default value is true. Manipulating this flag should be avoided whenever possible. Instead use work item handlers to make sure that work items are not disposed too early.
(Inherited from WorkDispatcher.)
Public propertyIsDisposed
Gets a value indicating whether this instance has been disposed.
(Inherited from WorkDispatcher.)
Public propertyMaxQueueSize
Gets or sets the maximum allowed number of items waiting to be dispatched. Before new items are added, items at the back of the queue will be canceled to make room.
(Inherited from WorkDispatcher.)
Top
Remarks

Before adding items, the MaxQueueSize must be set to an appropriate value.
Version Information

Supported in: 7.6, 7.5, 7.0, 6.5, 6.0, 5.5, 5.0
See Also

Reference