Class SessionLockAcquiredEvent

All Implemented Interfaces:
Serializable

public class SessionLockAcquiredEvent extends AbstractSessionLockEvent
Event fired through the service event bus when a Vaadin session lock has been acquired, for the outermost acquisition only.
Since:
25.3
See Also:
  • Constructor Details

    • SessionLockAcquiredEvent

      public SessionLockAcquiredEvent(VaadinService service)
      Creates a new event without a session and with a zero wait time.
      Parameters:
      service - the Vaadin service whose session lock is acquired, not null
    • SessionLockAcquiredEvent

      public SessionLockAcquiredEvent(VaadinService service, VaadinSession session, Duration waitTime)
      Creates a new event for the given session and wait time.
      Parameters:
      service - the Vaadin service whose session lock is acquired, not null
      session - the Vaadin session the lock belongs to, or null if it is not known
      waitTime - how long the thread waited for the lock, not null
  • Method Details

    • getWaitTime

      public Duration getWaitTime()
      Gets how long the thread waited for the lock, from the moment it requested the lock until it acquired it. The time other threads held the lock meanwhile is included, the time spent in listeners of SessionLockRequestedEvent is not.
      Returns:
      the wait time, not null