[jboss-user] [JBossCache] - Re: problem when using new Fqn with Integer

emailmsgbox do-not-reply at jboss.com
Thu Feb 8 17:49:14 EST 2007


thanks for your reply ,
but if I understand you correctlly ,It more a bug the a feature issue .

Since if I choose persistancy in my configuration ,I should not need to change the code


anonymous wrote : 
  | from  the documentation
  | 
  | String n1 = "/300/322649";
  | Fqn n2 = new Fqn(new Object{new Integer(300), new Integer(322649)});
  | 
  | In this example, we want to access a node that has information for employee with id=322649 in department with id=300. The string version needs two map lookups on Strings, whereas the Fqn version needs two map lookups on Integers. In a large hashtable, the hashCode() method for String may have collisions, leading to actual string comparisons. Also, clients of the cache may already have identifiers for their objects in Object form, and don't want to transform between Object and Strings, preventing unnecessary copying.
  | 
  | 

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

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



More information about the jboss-user mailing list