Class SessionClusterService

java.lang.Object
sk.iway.iwcm.stat.SessionClusterService

public class SessionClusterService extends Object
Handles session data across cluster nodes, storing and retrieving session information from the database to facilitate session management in a clustered environment.
  • Constructor Details

    • SessionClusterService

      public SessionClusterService()
  • Method Details

    • main

      public static void main(String[] args)
      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

      public static String getSessionInfo(String currentSessionId, int userId)
      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