This content has been marked as final.
Show 4 replies
-
1. Re: how to get sub fqn list by specifying the parent fqn?
brian.stansberry Sep 27, 2006 11:51 AM (in response to sting_hz)Don't construct an Fqn via the constructor. Do it like this:
cache.putObject(Fqn.fromString("/a"),null); cache.putObject(Fqn.fromString("/a/b"),null); cache.putObject(Fqn.fromString("/a/c"),null);
Note the presence of the leading '/'.
The Fqn.fromString() method knows how to parse the string using the '/' separator. The Fqn constructor just assumes whatever object is passed to it is the name. -
2. Re: how to get sub fqn list by specifying the parent fqn?
sting_hz Sep 27, 2006 9:37 PM (in response to sting_hz)Hi Brian,
Thanks for the quick reply.
Another question is how to get the recursive sub fqn list.
For example, I have
cache.putObject(Fqn.fromString("/a"),null);
cache.putObject(Fqn.fromString("/a/b/c"),null);
cache.putObject(Fqn.fromString("/a/c"),null);
Set set = cache.getChildrenNames(Fqn.fromString("/a"));
Currently the set only contains the direct sub fqn list: [b,c]
How to get the recusive sub fqn list like [b/c, c]
Thanks,
Steven -
3. Re: how to get sub fqn list by specifying the parent fqn?
brian.stansberry Sep 27, 2006 10:59 PM (in response to sting_hz)There's no simple API to do that; you'd to write a function to walk the tree and call getChildrenNames() at each level.
-
4. Re: how to get sub fqn list by specifying the parent fqn?
sting_hz Oct 4, 2006 10:36 AM (in response to sting_hz)thanks a lot