Originally posted by sultan khadar:
Congrats Shan. Could you please share your experience in detail ? Also please explain what is HFJS.
Thanks.
Sultan.
Deletes a record, making the record number and associated disk storage available for reuse.
Originally posted by Jason Moors:
If you don't implement the update method how will you modify the record to show that it's booked?
I would recommend implementing the methods as it doesn't require much code and would support future enhancement to the GUI and also will aid you in creating test files.
Data class method implementation
regards
Jason
Your data access class must be called "Data.java", must be in a package called "suncertify.db", and must implement the following interface: (The usual DB.java)
It must allow the user to book a selected record, updating the database file accordingly.
there is no way for the client to know if the update operation succeeded or not.
Why do the create method throw a DuplicateKeyException???
Data section. (offset into file equal to "offset to start of record zero" value)
Repeat to end of file:
2 byte flag. 00 implies valid record, 0x8000 implies deleted record
Record containing fields in order specified in schema section, no separators between fields, each field fixed length at maximum specified in schema information
Locking
Your server must be capable of handling multiple concurrent requests, and as part of this capability, must provide locking functionality as specified in the interface provided above. You may assume that at any moment, at most one program is accessing the database file; therefore your locking system only needs to be concerned with multiple concurrent clients of your server. Any attempt to lock a resource that is already locked should cause the current thread to give up the CPU, consuming no CPU cycles until the desired resource becomes available.