• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

NX: Question from a rookie: contractor assignment

 
Ranch Hand
Posts: 169
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Mark.
 
Roses are red, violets are blue. Some poems rhyme and some don't. And some poems are a tiny ad.
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic