Summer.Batch.Infrastructure.Repeat.Support.ResultHolderResultQueue Class Reference
An implementation of the Summer.Batch.Infrastructure.Repeat.Support.IResultQueue<TB> that throttles the number of expected results, limiting it to a maximum at any given time. More...
Inheritance diagram for Summer.Batch.Infrastructure.Repeat.Support.ResultHolderResultQueue:
Public Member Functions | |
ResultHolderResultQueue (int throttleLimit) | |
Custom constructor. More... | |
void | Expect () |
see IResultQueue::Expect() . More... | |
void | Put (IResultHolder result) |
see IResultQueue::Put() . More... | |
IResultHolder | Take () |
see IResultQueue::Take() . More... | |
bool | IsEmpty () |
see IResultQueue::IsEmpty() . More... | |
bool | IsExpecting () |
see IResultQueue::IsExpecting() . More... | |
void | Dispose () |
see https://msdn.microsoft.com/fr-fr/library/ms244737.aspx More... | |
Public Member Functions inherited from Summer.Batch.Infrastructure.Repeat.Support.IResultQueue< IResultHolder > | |
void | Expect () |
In a master-slave pattern, the master calls this method paired with Take() to manage the flow of items. Normally a task is submitted for processing in another thread, at which point the master uses this method to keep track of the number of expected results. It has the personality of an counter increment, rather than a work queue, which is usually managed elsewhere, e.g. by a IExecutor}. Implementations may choose to block here, if they need to limit the number or rate of tasks being submitted. More... | |
void | Put (TB result) |
Once it is expecting a result, clients call this method to satisfy the expectation. In a master-worker pattern, the workers call this method to deposit the result of a finished task on the queue for collection. More... | |
TB | Take () |
Gets the next available result, blocking if there are none yet available. More... | |
bool | IsEmpty () |
Used by master thread to verify that there are results available from Take() without possibly having to block and wait. More... | |
bool | IsExpecting () |
Checks if any results are expected. Usually used by master thread to drain queue when it is finished. More... | |
Detailed Description
An implementation of the Summer.Batch.Infrastructure.Repeat.Support.IResultQueue<TB> that throttles the number of expected results, limiting it to a maximum at any given time.
Constructor & Destructor Documentation
Summer.Batch.Infrastructure.Repeat.Support.ResultHolderResultQueue.ResultHolderResultQueue | ( | int | throttleLimit | ) |
Custom constructor.
- Parameters
-
throttleLimit throttleLimit the maximum number of results that can be expected at any given time.
Member Function Documentation
void Summer.Batch.Infrastructure.Repeat.Support.ResultHolderResultQueue.Dispose | ( | ) |
void Summer.Batch.Infrastructure.Repeat.Support.ResultHolderResultQueue.Expect | ( | ) |
see IResultQueue::Expect() .
bool Summer.Batch.Infrastructure.Repeat.Support.ResultHolderResultQueue.IsEmpty | ( | ) |
see IResultQueue::IsEmpty() .
- Returns
bool Summer.Batch.Infrastructure.Repeat.Support.ResultHolderResultQueue.IsExpecting | ( | ) |
see IResultQueue::IsExpecting() .
- Returns
void Summer.Batch.Infrastructure.Repeat.Support.ResultHolderResultQueue.Put | ( | IResultHolder | result | ) |
see IResultQueue::Put() .
- Parameters
-
result
IResultHolder Summer.Batch.Infrastructure.Repeat.Support.ResultHolderResultQueue.Take | ( | ) |
see IResultQueue::Take() .
- Returns
The documentation for this class was generated from the following file:
- Summer.Batch.Infrastructure/Repeat/Support/ResultHolderResultQueue.cs