directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kiran Ayyagari (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DIRSERVER-1294) Add size() and hasNext() methods to cursors
Date Sun, 31 Oct 2010 08:25:23 GMT

    [ https://issues.apache.org/jira/browse/DIRSERVER-1294?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12926687#action_12926687
] 

Kiran Ayyagari commented on DIRSERVER-1294:
-------------------------------------------

Getting or keeping track of count at a higher layer (other than the actual backend layer e.x
jdbm, bdb je) severely slows down the performance (esp. the
 search operation's). So it is highly unlikely to have this correctly implemented as long
as the underlying backend doesn't support.
(In the case of bdb je as a backend this is possible cause bdb je keeps track of the exact
count of records)

And coming to hashNext(), we can emulate this to an extent (in SearchHandler, currently we
call next() and if it returns true and we exceed the count limit 
then we call previous() to move back) but this won't be feasible in all Cursor implementations.

> Add size() and hasNext() methods to cursors
> -------------------------------------------
>
>                 Key: DIRSERVER-1294
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-1294
>             Project: Directory ApacheDS
>          Issue Type: Improvement
>    Affects Versions: 1.5.4
>            Reporter: Emmanuel Lecharny
>            Assignee: Felix Knecht
>            Priority: Minor
>             Fix For: 2.0.0-RC1
>
>         Attachments: size_has.patch
>
>
> The cursor implementation currently does not have the size() and hasNext() methods. They
would be very helpful in ma,ny places.
> For instance, the paged search control requires that the response control contains the
expected size. The hasNext() method could help to avoid a next() and previous() calls to check
if we have one more entry available in the cursor.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message