[This is preliminary documentation and is subject to change.]
The MatchingCoordinatorTInput, TCategory, TWorkStub, TWorkDescription, TWorkerDescription generic type exposes the following members.
Methods
Name | Description | |
---|---|---|
AddInput |
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.
| |
AssignWork |
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.
| |
EnumerateWork |
Given an input item, return a list of work items, each with a list of categories
| |
ExpandWorkItem |
Convert a work item stub to a work item once it is known which category, if any, it was matched to
| |
MapWorkerToQueue |
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
| |
NotifyQueueAddition |
called whenever a new worker queue is added
| |
NotifyQueueRemoval |
called whenever an existing worker queue becomes empty and is deleted
|
See Also