jackrabbit-oak-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Angela Schreiber <anch...@adobe.com>
Subject RangeIterators
Date Tue, 05 Jun 2012 13:08:51 GMT
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

Mime
View raw message