MatchingCoordinatorTInput, TCategory, TWorkStub, TWorkDescription, TWorkerDescription MethodsNaiad Help

[This is preliminary documentation and is subject to change.]

The MatchingCoordinatorTInput, TCategory, TWorkStub, TWorkDescription, TWorkerDescription generic type exposes the following members.

Methods

  NameDescription
Public methodAddInput
Implements ICoordinator.AddInput. Takes an input record and calls the user-supplied function provided in the constructor, to translate the input into a set of work items, each of which is annotated with a list of zero or more categories. As workers become ready, their work will be assigned from these items.
Public methodAssignWork
Implements ICoordinator.AssignWork. Given a worker that is now free, assign it a work item if any remain. If there is an item matching the worker it will be returned; otherwise if there is an item that wasn't matched to any worker it will be returned; otherwise an item from another category's queue that has a maximal number of pending items will be returned. If there are no items remaining to be assigned, this returns false.
Protected methodEnumerateWork
Given an input item, return a list of work items, each with a list of categories
Protected methodExpandWorkItem
Convert a work item stub to a work item once it is known which category, if any, it was matched to
Protected methodMapWorkerToQueue
Given a worker, return a matching queue from this.waitingWork (and fill in its key to categoryKey) or null if there is no matching queue
Protected methodNotifyQueueAddition
called whenever a new worker queue is added
Protected methodNotifyQueueRemoval
called whenever an existing worker queue becomes empty and is deleted
Top
See Also

Reference