aspose file tools*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes isLocked(int recNo) need to be synchronized ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "isLocked(int recNo) need to be synchronized ?" Watch "isLocked(int recNo) need to be synchronized ?" New topic
Author

isLocked(int recNo) need to be synchronized ?

Ziji (Jay) Zhang
Ranch Hand

Joined: Dec 17, 2004
Posts: 42
I have been reading posts here regarding locking implementation.
There are a few posts talking about isLockee() method.
I finally made my decision on how to implement this method,
but still have some dulbs need to be calarified.
1. I use a synchronizedMap to store recNo to clienID mapping.
Do I need to synchronize on isLocked() method? this method only check if
the record is in the map or not.



SCJP(94%)
Ziji (Jay) Zhang
Ranch Hand

Joined: Dec 17, 2004
Posts: 42
In the Data class I call this method,
but I also check if record is valid or not first,



Thanks,
Ziji
Ziji (Jay) Zhang
Ranch Hand

Joined: Dec 17, 2004
Posts: 42
In the Data class I call this method,
but I also check if record is valid or not first,



Thanks,
Ziji
 
 
subject: isLocked(int recNo) need to be synchronized ?