expose the accessor #with_lock method to allow locking connection operations in the future