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 Details

    • DefaultReactiveLockEventListener

      public DefaultReactiveLockEventListener()
  • Method Details

    • onLock

      public void onLock(org.hibernate.event.spi.LockEvent event) throws org.hibernate.HibernateException
      Specified by:
      onLock in interface org.hibernate.event.spi.LockEventListener
      Overrides:
      onLock in class org.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: ReactiveLockEventListener
      Handle the given lock event.
      Specified by:
      reactiveOnLock in interface ReactiveLockEventListener
      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.