[jboss-dev-forums] [Design of JBossCache] - Re: JBCACHE-166 - TreeSet/Map, LinkedHashMap
manik.surtani@jboss.com
do-not-reply at jboss.com
Wed Aug 6 07:45:42 EDT 2008
The problem with a createSortedNode() method on cache is the implicit creation of nodes. So what happens if you do:
cache.createSortedNode(/a/b/c, mySorting);
where /a exists and is sorted, but /b does not? Does /b get created as a sorted or unsorted node?
I guess as long as any assumptions are clearly documented, then we can use that as the only mechanism to create a sorted node. Beyond that, we could use Node.isSorted() and Node.getSortedData(), Node.getSortedChildren() as you suggested, throwing exceptions if Node.isSorted() == false.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4169004#4169004
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4169004
More information about the jboss-dev-forums
mailing list