Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Data class

 
Gurpreet Saini
Ranch Hand
Posts: 295
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi reader,
I had extended my Data class. Shall I eliminate lock and unlock methods from there ?. Or shall they remain where they are.
Thank you,
 
Vikas Sood
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Gurpreet Saini:
Hi reader,
I had extended my Data class. Shall I eliminate lock and unlock methods from there ?. Or shall they remain where they are.
Thank you,

I think as we are not supposed to implement the locking in local mode,we can leave the lock and unlock methods as it is.
Vikas
[ October 24, 2002: Message edited by: Vikas Sood ]
 
Gurpreet Saini
Ranch Hand
Posts: 295
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi vikas,
I have one common interface which is implemented by two specialized classes. They are LocalDataAccess and RemoteDataAccess. Both have thier lock and unlock methods. My question is the lock/unlock methods of Data class should be eliminated or not ?.
thank you,
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'd keep the methods in there, but not implemented. And you comment that the LockManager handles locks for the Data class and therefore this method remains blank.
Mark
 
Vikas Sood
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Gurpreet,
I agree with mark ,leavethe methods of Data and lLocalData empty.And do not remove the methods from Data class.As this Database structure might get upgraded in future implementations.
VikasSood
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic