jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Mueller <muel...@adobe.com>
Subject Re: [jr3] Tree model
Date Mon, 05 Mar 2012 12:49:42 GMT
Hi,

>> int getChildNodeCount();
>
>this doesn't work well when you have concurrent child node
>operations. 

I would expect the data doesn't change on the fly; I think it would work
well for an immutable node. For a mutable node, I wouldn't worry about
concurrency too much (concurrent changes within the same session). Except
the method should return a long :-)


>why do we have the method anyway?

I guess so you don't have to iterate over the whole list if you are only
interested in the count.

>> Iterable<ChildNodeEntry> getChildNodeEntries(int offset, int length);
>
>doesn't this imply that the implementation will keep the child
>nodes in a list?

Not necessarily. I think "offset" is OK (except it should be a long).

>how about:
>Iterable<ChildNodeEntry> getChildNodeEntries(ChildNodeEntry start, int
>length);

That would imply you have called getChildNodeEntries first, and have
iterated over the entries. In which case you already have an iterator.

>or
>Iterable<ChildNodeEntry> getChildNodeEntries(String childNodeNameStart,
>int length);

The offset better matches the MicroKernel API (that also uses the offset).
If the MicroKernel API uses an offset, how would you know the name.

Regards,
Thomas


Mime
View raw message