next up previous contents
Next: GroupRequest Up: RequestCorrelator Previous: Handling a request

   
Receiving a response

When RspCollector.ReceiveResponse is called, the client of request correlator (the same who created the RspCollector object) decides what to do. In the case of GroupRequest, it might wait until all the responses have been received (minus the responses from suspected members), until the first response has been received, or it might wait for a majority of all responses to arrive. Note that no response will be received if the response collector argument to SendRequest was null; no response collector entry will ever be created in this case, and the message will be sent one-way.

When all the responses have been received, method RequestCorrelator.Done should be called to remove the response collector entry from the table. If this was not done, response collector entries would accumulate in the table and take up space. Done has to be called by the request correlator client, because only it knows when 'all' responses have been received: for example 'all' could mean a majority, and in other cases it could mean 'responses from all members'.




1999-12-13