In This Article

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

Boolean:

true if the multi-threaded parser service is currently busy processing a request; otherwise, false.

PendingRequestCount

Gets the number of pending requests remaining in the parse request queue.

int PendingRequestCount { get; }

Property Value

Int32:

The number of pending requests remaining in the parse request queue.

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.

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

Boolean:

true if there is currently a pending request with the specified hash key; otherwise, false.

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.

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

Int32:

The number of pending requests that were removed.

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

Boolean:

true if a wait occurred; otherwise, false.

WaitForParse(String, Int32)

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 Int32

The maximum wait time in milliseconds.

Returns

Boolean:

true if a wait occurred; otherwise, false.

Inherited Members

See Also