jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marcel Reutegger <mreut...@adobe.com>
Subject RE: [jr3] Tree model
Date Mon, 05 Mar 2012 12:36:03 GMT
>     /**
>      * Returns the number of child nodes of this node.
>      *
>      * @return number of child nodes
>      */
>     int getChildNodeCount();

this doesn't work well when you have concurrent child node
operations. e.g. one session adds a child node while another
session removes the child nodes. IMO it would be better if
the number of child nodes is calculated by the caller. why
do we have the method anyway? ;)

>     Iterable<ChildNodeEntry> getChildNodeEntries(int offset, int length);

doesn't this imply that the implementation will keep the child
nodes in a list?

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

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

regards
 Marcel

Mime
View raw message