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

NX: Question from a rookie: contractor assignment

 
Manoj Gundawar
Ranch Hand
Posts: 169
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
The interface provided by Sun has method declarations like:
public String[] read(int recNo)
public void update(int recNo, String[] data, long lockCookie)
etc.
But there is no field called recno in the schema provided. How am I suppose to generate this?
Should I just assume that first record is record no 1 so on and so forth.
And each time I read file, I keep the count of record no for each record read. (because the same record, which has been requested for read can be updated. So during update, I need to know the rec no)
Does this sound ok?
And none of the methods provided in the interface are synchronized. Can I synchronize them? (or I can use the lock on the object too)
I guess I am little confused. Please forgive me, if my question sounds too nonsense to you.
Thanks in advance
manoj
[ July 24, 2003: Message edited by: Jmannu gundawar ]
[ July 24, 2003: Message edited by: Jmannu gundawar ]
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You are correct about recno. It correlates to the record in the db.db file. It is not a stored field. As you had said the first record is recno 1. second record is recno 2.
Putting Synchronized on methods and/or object locks are part of your design decisions to make.
Have fun.
Mark
 
Manoj Gundawar
Ranch Hand
Posts: 169
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Mark.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic