I think the key point is that clustered locks need to be specified only when touching clustered state (shared objects). Usually the shared data structure is fairly contained and accessed through a pretty narrow set of paths, and hence distributed locking needs to be defined only on those narrow paths.
So, for example, say you had a cache of user information stored in a HashMap and the HashMap was shared. You need to perform clustered locking only when accessing the HashMap (get/put/etc) or when accessing objects in the HashMap (the User object maybe). Or put another way, clustered locking occurs only when you do synchronized(sharedObject). ----- Original Message ----- From: "Jason Chaffee" <[EMAIL PROTECTED]> To: [EMAIL PROTECTED], [email protected] Sent: Thursday, December 6, 2007 11:23:45 PM (GMT-0600) America/Chicago Subject: Re: [tc-dev] [tc-users] global lock level I am not sure I totally grasp what you mean by: Worth noting I think that adding auto-locking on classes of instances that aren't ever shared has no impact. Distributed locks only occur when a shared object is locked on. So the number of locks one generally needs is usually small. Would it be possible to get some elaboration or see a brief example? Maybe I am just being dumb because of the long day….:) _______________________________________________ tc-dev mailing list [email protected] http://lists.terracotta.org/mailman/listinfo/tc-dev _______________________________________________ tc-dev mailing list [email protected] http://lists.terracotta.org/mailman/listinfo/tc-dev
