class ThreadsafeModel implements Model {

    @Override
    public Model addAttribute(String attributeName, Object attributeValue) {
        return withWriteLock(() -> model.addAttribute(attributeName, attributeValue));
    }

      ThreadsafeModel(Model model);

}