Thanks Chris,

A couple more of my own cents:
The RefreshableCachedObject and CachedObject objects are meant to be shared,
so I think even the trivial methods should be synchronized. There will be
very little contention for these methods, so there will be no performance
hit by doing so. Better safe than sorry.

>
> > Also, in TurbineGlobalCacheService.clearCache(), the operations of
removing
> > or refreshing the objects should be sync'd.
>
> I am sure your aware that the hashtable is synchronised - so all the
get/put/remove ops are sync'd.  If all is working correctly (?) then only
one cache service should be running and only one thread calling clearCache -
perhaps making the method private would ensure this - does anyone external
call that method - its not part of the interface.  So again I would think no
sync'ing changes are needed.
>

Sorry, I should have been clearer and more complete - In clearCache, we are
enumerating over the Hashtable. Another thread can come along and mess with
the Hashtable inbetween iterations in a completely different method causing
unpredictable results in clearCache.

Anybody else have any opinions on this?

Chris ( Campbell )
[EMAIL PROTECTED]




------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?:           [EMAIL PROTECTED]

Reply via email to