Class DefaultReactiveLockEventListener

  • All Implemented Interfaces:
    java.io.Serializable, org.hibernate.event.spi.LockEventListener, ReactiveLockEventListener

    public class DefaultReactiveLockEventListener
    extends org.hibernate.event.internal.AbstractReassociateEventListener
    implements org.hibernate.event.spi.LockEventListener, ReactiveLockEventListener
    See Also:
    Serialized Form
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void onLock​(org.hibernate.event.spi.LockEvent event)  
      java.util.concurrent.CompletionStage<java.lang.Void> reactiveOnLock​(org.hibernate.event.spi.LockEvent event)
      Handle the given lock event.
      protected java.util.concurrent.CompletionStage<java.lang.Void> upgradeLock​(java.lang.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.AbstractReassociateEventListener

        reassociate
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DefaultReactiveLockEventListener

        public DefaultReactiveLockEventListener()
    • Method Detail

      • reactiveOnLock

        public java.util.concurrent.CompletionStage<java.lang.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 java.util.concurrent.CompletionStage<java.lang.Void> upgradeLock​(java.lang.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.
      • onLock

        public void onLock​(org.hibernate.event.spi.LockEvent event)
                    throws org.hibernate.HibernateException
        Specified by:
        onLock in interface org.hibernate.event.spi.LockEventListener
        Throws:
        org.hibernate.HibernateException