Correct me if I am wrong - An instance of type Map is used to implement the cache. In the constructor of the AbstractMemoryCache a Hashtable is instantiated. Any operation that involves a single get/put is not explicitly synchronized as the Hashtable will do that anyway.
map is explicitly synchronized using (Java synchronization) only when hierarchical removal of keys is requested. Another observation is that removeAll() is implemented in class AbstractMemoryCache and is not overridden in LRUMemoryCache. Consequently on removeAll() the linked list maintained in LRUMemoryCache is not freed. Please let me know if I am missing something. Regards, Snehal --- Hanson Char <[EMAIL PROTECTED]> wrote: > Check out if the access to the individual caches are > guarded via read/write > lock, or just via the usual Java syhchronization. > > -----Original Message----- > From: Snehal Haridas > [mailto:[EMAIL PROTECTED]] > Sent: Monday, November 18, 2002 7:23 PM > To: JCS > Subject: removeAll method in class > AbstractMemoryCache using a HashMap > > > I noticed the removeAll method in class > AbstractMemoryCache instantiates a new HashMap as > opposed to a Hashtable (used in the constructor). > > How is thread safety guaranteed with a HashMap > implementation? > > Is this a bug? > > Regards, > Snehal > > > __________________________________________________ > Do you Yahoo!? > Yahoo! Web Hosting - Let the expert host your site > http://webhosting.yahoo.com > > -- > To unsubscribe, e-mail: > <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: > <mailto:[EMAIL PROTECTED]> > __________________________________________________ Do you Yahoo!? Yahoo! Web Hosting - Let the expert host your site http://webhosting.yahoo.com -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
