Package com.vaadin.flow.server
Class SessionLockAcquiredEvent
java.lang.Object
java.util.EventObject
com.vaadin.flow.server.AbstractSessionLockEvent
com.vaadin.flow.server.SessionLockAcquiredEvent
- All Implemented Interfaces:
Serializable
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:
-
Field Summary
Fields inherited from class java.util.EventObject
source -
Constructor Summary
ConstructorsConstructorDescriptionSessionLockAcquiredEvent(VaadinService service) Creates a new event without a session and with a zero wait time.SessionLockAcquiredEvent(VaadinService service, VaadinSession session, Duration waitTime) Creates a new event for the given session and wait time. -
Method Summary
Modifier and TypeMethodDescriptionGets how long the thread waited for the lock, from the moment it requested the lock until it acquired it.Methods inherited from class com.vaadin.flow.server.AbstractSessionLockEvent
getService, getSession, getSourceMethods inherited from class java.util.EventObject
toString
-
Constructor Details
-
SessionLockAcquiredEvent
Creates a new event without a session and with a zero wait time.- Parameters:
service- the Vaadin service whose session lock is acquired, notnull
-
SessionLockAcquiredEvent
Creates a new event for the given session and wait time.- Parameters:
service- the Vaadin service whose session lock is acquired, notnullsession- the Vaadin session the lock belongs to, ornullif it is not knownwaitTime- how long the thread waited for the lock, notnull- Since:
- 25.4
-
-
Method Details
-
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 ofSessionLockRequestedEventis not.- Returns:
- the wait time, not
null - Since:
- 25.4
-