Compartilhar via


4.1.10.5.7 GetResponseSubset

 procedure GetResponseSubset(
   msgIn: DRS_MSG_GETCHGREQ_V10,
   changedObjs: set of ObjAtts,
   changedLinks: set of ObjAttVal,
   var msgOut: DRS_MSG_GETCHGREPLY_NATIVE,
   var responseObjs: set of ObjAtts,
   var responseLinks: set of ObjAttVal)

The GetResponseSubset procedure selects subsets of the changed objects and link values to include in this response. It utilizes the cookie msgIn.usnvecFrom—which is zero or a value returned to the client in a previous response—and the client-requested limits msgIn.cMaxObjects and msgIn.cMaxBytes to determine the subsets. This procedure then sets msgOut.usnvecTo to a new cookie that the client presents in its next request as msgIn.usnvecFrom.

The server SHOULD<30> choose a subset such that the response will contain no more objects than msgIn.cMaxObjects and no more bytes (before any compression is applied) than msgIn.cMaxBytes.

It is valid for the response to contain no objects or link values. It is valid for an object or a link value to appear multiple times in a single response, and the object's attribute values or the link values need not be identical. It is valid for an object or a link value to appear both in the current response and in an earlier response in the same cycle, and the object's attribute values or the link values need not be identical.

If the server determines, by using state that is maintained via msgIn.usnvecFrom and msgOut.usnvecTo, that inclusive of what it is sending in this response, it will have sent at least changedObjs and changedLinks to the client, then it concludes the cycle by returning with msgOut.fMoreData = false. Therefore, if this is the first response message of a cycle, the server only returns with msgOut.fMoreData = false if responseObjs = changedObjs and responseLinks = changedLinks.

Subject to resource constraints on the server, if neither changedObjs nor changedLinks increases during a sequence of calls, the server eventually returns msgOut.fMoreData = false.