No, because the lock is related with the update of the reference to the variables randomAccessFileQueueStore1 and randomAccessFileQueueStore2 and not to the object they reference.