Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

is it illegal to alter the signature of lock()/unlock() method in Data class ?

 
morph wang
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
is it illegal to alter the signature of lock()/unlock() method in Data class ?
If not, I think it's hard to track the client ID in it. (I'm using RMI)
 
veron luis
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
You can do whatever you want in you program (assignment) as long as you can explain the reason in you "design" documentation.

Cheers,
luis
 
John Lee
Ranch Hand
Posts: 2545
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is legal not to alter the signature of lock()/unlock() method in Data class.
What I did is:
public void lock( int record )
{
synthronized(this) {
....................
}
}
Don
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic