Class SessionUtil
java.lang.Object
com.vaadin.kubernetes.starter.sessiontracker.SessionUtil
Utility class for session operations.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic RunnableinjectLockIfNeeded(com.vaadin.flow.server.VaadinSession session) VaadinSession lock is usually set by callingVaadinSession.refreshTransients(WrappedSession, VaadinService), but during deserialization none of the required objects are available.
-
Constructor Details
-
SessionUtil
public SessionUtil()
-
-
Method Details
-
injectLockIfNeeded
VaadinSession lock is usually set by callingVaadinSession.refreshTransients(WrappedSession, VaadinService), but during deserialization none of the required objects are available. This method gets the lock instance if exists, or injects a temporary lock instance into the providedVaadinSession, acquires the lock, and returns a runnable that will unlock or remove the lock when executed.- Parameters:
session- the session to be locked if needed- Returns:
- a runnable that will unlock or remove the lock when executed, or a no-op in case of any error
-