directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kiran Ayyagari <kayyag...@apache.org>
Subject Re: [Client-API] adding a new method to SearchCursor
Date Thu, 08 Jul 2010 07:47:35 GMT
On Thu, Jul 8, 2010 at 1:10 PM, Emmanuel Lecharny <elecharny@gmail.com> wrote:
>  On 7/8/10 9:15 AM, Kiran Ayyagari wrote:
>>
>> hi guys,
>>
>>     The SearchCursor which we use to get the search results lacks a
>> way to return the SearchResultDone message.
>>     Seelmann pointed this out on IRC today and I have proposed that
>> will add a new method getSearchDone() to the SearchCursor.
>>
>>     This method can be called at the end of cursor traversal (after
>> cursor.next() returns false) to get the SearchResultDone message.
>
> Just wondering : if you want to get the SearchResultDone after the last call
> to cursor.next(), that means you don't return this SearchResultDone in
> cursor.next() ?
right, SearchResultDone is not returned with cursor.next(), the reason
is to avoid
an instanceof check in the while(cursor.next()) loop.

(in case of SearchResultReference or SearchIntermediateResponse the
user has to cast
anyway but atleast in the case of SearchResultDone it can be avoided
cause it will always
come last)

Kiran Ayyagari

Mime
View raw message