We get a distributed lock named myLock on our cache. After entering the lock, we query the in-memory H2 database and bulk process the entries by calling the invokeAll method of our cache. Our entry processor updates the SeatStatus fields. After the process, we release the lock, and the final state of the table is:

In this example we achieved two important things:

Get a distributed lock on the cache with a specific key.

Bulk process the entries on the server side with an entry processor.

We can use this logic as a "Select For Update Skip Locked" mechanism, meaning we take its advantages on some relational databases (for example, Oracle, PostgreSQL).