Win a copy of The Business Blockchain this week in the Cloud forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

(NX)Must I use "LockManager"??

 
biang lin
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't have a "LockManager" class,I just use a HashMap to store cookies.
So will I lose points on it??
 
Andrew Monkhouse
author and jackaroo
Marshal Commander
Pie
Posts: 12007
215
C++ Firefox Browser IntelliJ IDE Java Mac Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Biang,
No, you do not have to have a LockManager, and you will not loose points if you dont have one.
Regards, Andrew
 
Arjan Broer
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by biang lin:
I don't have a "LockManager" class,I just use a HashMap to store cookies.

But how do you pass the cookies? The DBMain interface passes the recno parameter only. This means you would violate the DBMain interface and thereby violate the assignment requirements. Or did i miss something?
 
Andrew Monkhouse
author and jackaroo
Marshal Commander
Pie
Posts: 12007
215
C++ Firefox Browser IntelliJ IDE Java Mac Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Arjan
There are many different versions of the three different assignments. Some versions require cookies to be returned by the lock method and used in other methods. Other versions do not allow cookies to be used within any of the methods of the Data class.
If Biang has one of the assignments that allows him to return a long cookie from his lock method, then he can store that cookie inside a map within the Data class.
Regards, Andrew
 
Arjan Broer
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Andrew Monkhouse:
There are many different versions of the three different assignments.

Oeps, didn't think of that.
 
biang lin
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
Thanks for your comments.
I think locking is very simple in my project,so I didn't use LockManager.
But I have another question:
There are 80 points in the Marking Criteria for Locking, so it is very important in the project.
But I think it need only a little code to do it(two methods and about 20 lines of code).
So what these 80 points for?
 
Max Habibi
town drunk
( and author)
Sheriff
Posts: 4118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is one of those cases where less is more
M
 
biang lin
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Max Habibi:
This is one of those cases where less is more
M

"Less is more"!!
Ha, I like it.
 
Jim Yingst
Wanderer
Sheriff
Posts: 18671
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Unlike, say, Max's hair - where less is simply less.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic