[jboss-user] [JBossCache] - Re: Should Fqns only contain String elements?
do-not-reply at jboss.com
Fri Feb 9 14:08:05 EST 2007
Non-String in FQN reasons:
1. I work with a lot of numbers and ranges. Converting from numeric to string and back again is inefficient and annoying.
2. Strings are bulky objects compared to Integer, especially in huge numbers.
3. Most CacheLoaders could support them. Admittedly this would require some work or restrictions.
For example, in the FileCacheLoader, you could simply use a PropertyEditor to convert the object to text and use this as the directory name. Store the PE used in the data file. Then, use a PropertyManager to convert the directory name back to an Object.
For BDB, convert the FQN to a byte array using serialization.
4. I would be nice to use package-private objects in FQN that would be invisible to the user to restrict data access. This is better than crafting strings that look like __HIDDEN_DATA_DO_NOT_TOUCH_PLEASE__ .
Allowing null in FQN does suck and there are probably some bugs in JBC handling them. That's a different thread perhaps.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4013825#4013825
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4013825
More information about the jboss-user