You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-dev@jackrabbit.apache.org by Angela Schreiber <an...@adobe.com> on 2012/06/05 15:08:51 UTC

RangeIterators

hi

it seems to me that we currently lack all kind of support for
RangeIterator#getSize in various places such as Node#getNodes
and Node#getProperties in all different flavors.

while this might be perfectly reasonable in those cases where
an node has a huge amount of child items, i would argue that
RangeIterator#getSize was pretty useful and is widely used in
all kind of user interfaces. imo the whole reason for introducing
the rangeiterator interface in JCR was to be able to gracefully
handle both small and huge amount of child items and where -1 usually
indicates that there the number is completely unknown or too big to 
calculate.

dropping that functionality will basically force API consumers to
loop over the iterator in order to find out about the size.

imo we should reconsider that across the whole stack and make sure
that we can indicate the size of a NodeIterator/PropertyIterator
in those cases where the number of child-items was known.

kind regards
angela

Re: RangeIterators

Posted by Michael Dürig <md...@apache.org>.

Hi,

I created OAK-135 for this.

Michael

On 5.6.12 14:08, Angela Schreiber wrote:
> hi
>
> it seems to me that we currently lack all kind of support for
> RangeIterator#getSize in various places such as Node#getNodes
> and Node#getProperties in all different flavors.
>
> while this might be perfectly reasonable in those cases where
> an node has a huge amount of child items, i would argue that
> RangeIterator#getSize was pretty useful and is widely used in
> all kind of user interfaces. imo the whole reason for introducing
> the rangeiterator interface in JCR was to be able to gracefully
> handle both small and huge amount of child items and where -1 usually
> indicates that there the number is completely unknown or too big to
> calculate.
>
> dropping that functionality will basically force API consumers to
> loop over the iterator in order to find out about the size.
>
> imo we should reconsider that across the whole stack and make sure
> that we can indicate the size of a NodeIterator/PropertyIterator
> in those cases where the number of child-items was known.
>
> kind regards
> angela