• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

NX: ?mark about Locking of NX

 
ZhiYuan Lin
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi
i have looked some topic about passed,their Locking is low marking
such as
form Bob that his locking is 22, his others is close maximum
What did I screw up with locking? Not sure. I used a lock manager collection and a specialized lock with acquire/release and timeout. However, I used a cookie scheme that permitted cookie sharing for multiple record operations; i.e., I permitted multiple record delete. I also permitted non-unique cookies. Furthermore, I synchronized all record read/write operations for data consistency. One of those choices probably did me in. Those who have read my previous posts probably can guess that I still think my design decisions were correct. Oh well ...

form Perry that his locking is 44,

For locking, I stored locks in a single static Map associated with the data file used and handed out new instances of Data to each client, storing a unique ID number and record number pair in the static collection. I also used an auto-timeout method (TimerTask) for automatically unlocking records after a few minutes.

my locking is as same as them, my have a Map to store record number and lockCookie, and client locks and unlocks during update. i uses Unreferenced interface to unlock the locks of dead client. and i still want have a timeout that uses a Map to store record number and lock time, but it still have problem this thread
what should i or we to do that sun want???
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic