I am currently using a single Reentrant lock. This is less efficient. I am contemplating re-writing my locking so that it has multiple locks. Has anyone gotten 80/80 with a single Reentrant lock? Will I get punished?
It seems to be a delicate balance between over engineering and under engineering.
SCJA | SCJP | SCJD | SCMAD | SCEA(Underway...)
posted 9 years ago
I had 2 locks: one for the database file and one for the HashMap with the locked records. (and I got 80/80 for that).
I don't think that effiency is really an issue here: as long as you can explain your decisions.