public class DefaultReactiveLockEventListener extends AbstractReassociateEventListener implements ReactiveLockEventListener
Constructor and Description |
---|
DefaultReactiveLockEventListener() |
Modifier and Type | Method and Description |
---|---|
void | onLock(LockEvent event) |
CompletionStage<Void> | reactiveOnLock(LockEvent event) Handle the given lock event. |
protected CompletionStage<Void> | upgradeLock(Object object, EntityEntry entry, LockOptions lockOptions, EventSource source) Performs a pessimistic lock upgrade on a given entity, if needed. |
public CompletionStage<Void> reactiveOnLock(LockEvent event) throws HibernateException
ReactiveLockEventListener
reactiveOnLock
in interface ReactiveLockEventListener
event
- The lock event to be handled.HibernateException
protected CompletionStage<Void> upgradeLock(Object object, EntityEntry entry, LockOptions lockOptions, EventSource source)
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.public void onLock(LockEvent event) throws HibernateException
HibernateException