Try to acquire locks only on methods which update the repository

Signed-off-by: Laurent Fazio <laurent.fazio@la-fenouillette.fr>