A third way to coordinate shared state: optimistic, language-level, and modeled directly on database transactions. Most Java developers reach for…