The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
- this assumption is too strict, isn't it? The "no cpu cycles" policy is taken too literaly, don't you think? IMO, "consume no CPU cycles" means: "aviod active waiting". I've decided to synchronize on locks map, and I feel good with this decision.It should not be notified if record 0 or record 2 is unlocked -- since that would consume CPU cycles.
I was thinking of a different section of the requirements. E.g. from my defintion of the lock() method:// Locks a record so that it can only be updated or deleted by this client.In my instructions, I got this requirement on my locking:
Your server must be capable ...
It seems no obvious requirements on "Locks a record so that it can only be updated or deleted by this client".
The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime. |