Package com.vaadin.flow.server
Class SessionLockReleasedEvent
java.lang.Object
java.util.EventObject
com.vaadin.flow.server.AbstractSessionLockEvent
com.vaadin.flow.server.SessionLockReleasedEvent
- All Implemented Interfaces:
Serializable
Event fired through the
service event bus
when a Vaadin session lock has been released, for the outermost release only.
It is fired in reverse registration order so that listeners nest: a listener
added first is notified of the release last.- Since:
- 25.3
- See Also:
-
Field Summary
Fields inherited from class java.util.EventObject
source -
Constructor Summary
ConstructorsConstructorDescriptionSessionLockReleasedEvent(VaadinService service) Creates a new event without a session and with a zero hold time.SessionLockReleasedEvent(VaadinService service, VaadinSession session, Duration holdTime) Creates a new event for the given session and hold time. -
Method Summary
Modifier and TypeMethodDescriptionGets how long the thread held the lock, from the moment it acquired the lock until it released it.Methods inherited from class com.vaadin.flow.server.AbstractSessionLockEvent
getService, getSession, getSourceMethods inherited from class java.util.EventObject
toString
-
Constructor Details
-
SessionLockReleasedEvent
Creates a new event without a session and with a zero hold time.- Parameters:
service- the Vaadin service whose session lock is released, notnull
-
SessionLockReleasedEvent
Creates a new event for the given session and hold time.- Parameters:
service- the Vaadin service whose session lock is released, notnullsession- the Vaadin session the lock belongs to, ornullif it is not knownholdTime- how long the thread held the lock, notnull
-
-
Method Details
-
getHoldTime
Gets how long the thread held the lock, from the moment it acquired the lock until it released it. The time spent in listeners ofSessionLockAcquiredEventis included, since the lock is held while they run.- Returns:
- the hold time, not
null
-