Class PessimisticClusterApplyLock

java.lang.Object
io.jmix.dynmodel.impl.cluster.PessimisticClusterApplyLock
All Implemented Interfaces:
ClusterApplyLock

public class PessimisticClusterApplyLock extends Object implements ClusterApplyLock
Apply lock backed by the pessimistic lock add-on. The lock is cluster-wide when the application is configured with a distributed cache.

LockManager.expireLocks() evicts a lock purely by its age against jmix.dynmodel.cluster.apply-lock-timeout-sec; there is no heartbeat, so an apply that is still running after that timeout looks exactly like a lock left behind by a crashed node: another node then takes the lock and applies at the same time. The timeout must therefore be set above the longest apply the application can produce.