Matthew Melvin

Greenhorn
+ Follow
since Mar 08, 2012
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Matthew Melvin

Thanks Roberto,

I'm using a memory cache with a thread to persist the db once a minute and a shut down hook. At present I mark my in memory objects as deleted and then write them back into the file with the deleted flag set to true. So the interface is implemented and it hasn't been changed. I have therefore fully complied with the specification in that sense. However, my deleteRecord method does not make the record number and the associated disk space available for reuse.

My view is that the comments in the interface do not constitute part of the interface. If there were specifics about what implementations need to do then they should be in javadoc format so that they are visible outside the source.

I'm just trying to get a concensus on whether that is a fair standpoint or whether I'm being naive.


I've read a couple of threads on this and not come up with an answer. My interface contains the following....



Firstly, there is no must here so I'm not considering this mandatory.
Additionally, since the description is not in javadoc format I don't consider it to constitute a contract for all implementations. (If I was implementing without the benefit of the source file I wouldn't be able to see this information and so it would have no bearing on my design).

For simplicity, my intention was simply to use a logical delete by marking records deleted, excluding them from reads and searches but leaving the entries in the file.

Has anyone out there failed for taking this approach or feel that this is a contravention of the spec?