hi, everybody: i just came to this wonderful forum and so happy to talk with you guys. u know, last week, i download the developer assignment and busy thinking the issues. i have to admit it is a great challenge to me and finally, hope to make the assignment well done at last. some methods in the Data class has synchronized key word. and in my understanding, if we design the lock and unlock method, and implement them, the synchronized key word should be removed. and it is what Sun want us to do: synchronize the "write" function in the record level. Am i thinking right? hope to get reply from people staying here. thank you very much! peter yuan
hi all, if i understand correctly then, if you do not remove the synchronized from modify() then the entire database is locked for the duration of the modify method, and not just the record? please correct me if im wrong hmm... but perhaps this is desired, so another client cannot seek() something else in the middle of the modify operation. sincerely morten wilken
if i understand correctly then, if you do not remove the synchronized from modify() then the entire database is locked for the duration of the modify method, and not just the record?
the modify method, is where the physical writing of the new data occurs, so it is important that this is not done at the same time as any of the other syncd methods (add, delete, getrecord etc) otherwise the underlying database file could be corrputed.
subject: Remove synchronized from the data methods?