Class DefaultReactiveLockEventListener
java.lang.Object
org.hibernate.event.internal.DefaultLockEventListener
org.hibernate.reactive.event.impl.DefaultReactiveLockEventListener
- All Implemented Interfaces:
Serializable,org.hibernate.event.spi.LockEventListener,ReactiveLockEventListener
public class DefaultReactiveLockEventListener
extends org.hibernate.event.internal.DefaultLockEventListener
implements org.hibernate.event.spi.LockEventListener, ReactiveLockEventListener
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidonLock(org.hibernate.event.spi.LockEvent event) reactiveOnLock(org.hibernate.event.spi.LockEvent event) Handle the given lock event.protected CompletionStage<Void>upgradeLock(Object object, org.hibernate.engine.spi.EntityEntry entry, org.hibernate.LockOptions lockOptions, org.hibernate.event.spi.EventSource source) Performs a pessimistic lock upgrade on a given entity, if needed.Methods inherited from class org.hibernate.event.internal.DefaultLockEventListener
reassociate
-
Constructor Details
-
DefaultReactiveLockEventListener
public DefaultReactiveLockEventListener()
-
-
Method Details
-
onLock
public void onLock(org.hibernate.event.spi.LockEvent event) throws org.hibernate.HibernateException - Specified by:
onLockin interfaceorg.hibernate.event.spi.LockEventListener- Overrides:
onLockin classorg.hibernate.event.internal.DefaultLockEventListener- Throws:
org.hibernate.HibernateException
-
reactiveOnLock
public CompletionStage<Void> reactiveOnLock(org.hibernate.event.spi.LockEvent event) throws org.hibernate.HibernateException Description copied from interface:ReactiveLockEventListenerHandle the given lock event.- Specified by:
reactiveOnLockin interfaceReactiveLockEventListener- Parameters:
event- The lock event to be handled.- Throws:
org.hibernate.HibernateException
-
upgradeLock
protected CompletionStage<Void> upgradeLock(Object object, org.hibernate.engine.spi.EntityEntry entry, org.hibernate.LockOptions lockOptions, org.hibernate.event.spi.EventSource source) Performs a pessimistic lock upgrade on a given entity, if needed.- Parameters:
object- The entity for which to upgrade the lock.entry- The entity's EntityEntry instance.lockOptions- contains the requested lock mode.source- The session which is the source of the event being processed.
-