Package sk.iway.iwcm.stat
Class SessionClusterService
java.lang.Object
sk.iway.iwcm.stat.SessionClusterService
Handles session data across cluster nodes, storing and retrieving session information
from the database to facilitate session management in a clustered environment.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringgetSessionInfo(String currentSessionId, int userId) Returns session information for the given user in JSON format, used in dashboard appstatic com.fasterxml.jackson.databind.node.ArrayNodegetUserSessionsAllNodes(int userId) Read session data in database and deserialize to JSON nodesstatic voidYou can schedule this method to run periodically using CRONstatic voidUpdate session data in the database for the current node
-
Constructor Details
-
SessionClusterService
public SessionClusterService()
-
-
Method Details
-
main
You can schedule this method to run periodically using CRON- Parameters:
args-
-
getUserSessionsAllNodes
public static com.fasterxml.jackson.databind.node.ArrayNode getUserSessionsAllNodes(int userId) Read session data in database and deserialize to JSON nodes- Parameters:
userId-- Returns:
-
getSessionInfo
Returns session information for the given user in JSON format, used in dashboard app- Parameters:
currentSessionId-userId-- Returns:
-
updateSessionData
public static void updateSessionData()Update session data in the database for the current node
-