Hi all I am almost done with my read() method and i came into a position where i had to ask for a little advice on my algorithm! I am using a cache for the contractor records! Suppose i want to read a record i would have to do the following:
Well my question is this: Am i synchronising too much? Or is just ok! I imagined i check if the record value exist and then i also check it is not locked before i now check for the record! Again, since i know the number of records in my data file and the instruction says to create a new record we check for the byte flag and can reuse the space of the other record that has a byte flag of 0. Could i hard code:
instead of what i have above? Please an insight would be appreciated!