• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

NX:Booking a Seat

 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello, I have a question about synchronized like these:
1) I have a class named LockManager whitch do "genCookie", "LockRecord" ,
"unlockRecord" ...
synchronized boolean unlockRecNo(
long recNo , long lockCookie ){
....
}
synchronized boolean lockRecNo(
long recNo , long lockCookie ){
....
}
2) In client, when i Book a seat I do like:
lockManager.LockRecord;
Book;
lockManager.unlock;
Doing like these , is right?
Thank you first.
 
author and jackaroo
Posts: 12200
280
Mac IntelliJ IDE Firefox Browser Oracle C++ Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Steven,
You have been asked 9 times to change your name to meet the JavaRanch Naming Policy. Your account will now be closed.
Andrew
 
It's weird that we cook bacon and bake cookies. Eat this tiny ad:
New web page for Paul's Rocket Mass Heaters movies
https://coderanch.com/t/785239/web-page-Paul-Rocket-Mass
reply
    Bookmark Topic Watch Topic
  • New Topic