IParseRequestDispatcher Interface
Provides the base requirements for a class that can queue up IParseRequest objects, prioritize and execute them on one or more worker threads, and notify an IParseTarget of the result.
public interface IParseRequestDispatcher : IDisposable
Properties
IsBusy
Gets whether the multi-threaded parser service is currently busy processing a request.
bool IsBusy { get; }
Property Value
- bool:
trueif the multi-threaded parser service is currently busy processing a request; otherwise,false.
See Also
PendingRequestCount
Gets the number of pending requests remaining in the parse request queue.
int PendingRequestCount { get; }
Property Value
- int:
The number of pending requests remaining in the parse request queue.
See Also
Methods
GetPendingRequests()
Gets an array of the pending requests in the parse request queue.
IParseRequest[] GetPendingRequests()
Returns
- IParseRequest[]:
An array of the pending requests in the parse request queue.
See Also
HasPendingRequest(string)
Returns whether there is currently a pending request with the specified hash key.
bool HasPendingRequest(string parseHashKey)
| Parameter | Type | Description |
|---|---|---|
| parseHashKey | string | The parse hash key identifying the request for which to search. |
Returns
- bool:
trueif there is currently a pending request with the specified hash key; otherwise,false.
See Also
QueueRequest(IParseRequest)
Adds an IParseRequest to the queue of pending requests.
void QueueRequest(IParseRequest request)
| Parameter | Type | Description |
|---|---|---|
| request | IParseRequest | The IParseRequest that should be processed. |
See Also
RemovePendingRequests(string)
Removes any pending requests in the parse request queue that have the specified hash key.
int RemovePendingRequests(string parseHashKey)
| Parameter | Type | Description |
|---|---|---|
| parseHashKey | string | The parse hash key for which to search. |
Returns
- int:
The number of pending requests that were removed.
See Also
WaitForParse(string)
Waits a maximum of 250 milliseconds for the specified request to complete.
bool WaitForParse(string parseHashKey)
| Parameter | Type | Description |
|---|---|---|
| parseHashKey | string | The parse hash key identifying the request for which to wait. |
Returns
- bool:
trueif a wait occurred; otherwise,false.
See Also
WaitForParse(string, int)
Waits for the specified request to complete, up to a maximum number of milliseconds.
bool WaitForParse(string parseHashKey, int maximumWaitTime)
| Parameter | Type | Description |
|---|---|---|
| parseHashKey | string | The parse hash key identifying the request for which to wait. |
| maximumWaitTime | int | The maximum wait time in milliseconds. |
Returns
- bool:
trueif a wait occurred; otherwise,false.