[jboss-user] [JBoss Cache: Core Edition] - Best practice to establish if a node has children

nathanmesser do-not-reply at jboss.com
Fri Mar 13 06:44:13 EDT 2009


We're wondering what the best practise to establish if a node has children is.

"Node" doesn't appear to have anything to directly to this (a hasChildren() method for example), and the closest thing we've found is getChildrenNames(), which is relatively slow.

"NodeSPI" has a "hasChildrenDirect()" method, which is exactly the kind of thing we're after, and all the current implementations I could see of "Node" currently implement NodeSPI, but I see from the docs that it's quite clear we shouldn't be using the NodeSPI interface.

So I was wondering if there is a recommended way to do this, or if there were any plans to add a hasChildren() method to the Node interface, or whether I should submit a feature request.


View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4217794#4217794

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4217794



More information about the jboss-user mailing list