Interface SessionDAO

    • Method Detail

      • deleteCurrentNodeSessions

        void deleteCurrentNodeSessions()
        Removes all the sessions that refers to the current node
      • countSessions

        int countSessions​(Long tenantId,
                          Integer status)
        Counts the number of sessions.
        Parameters:
        tenantId - The tenant (optional)
        status - The current status (optional)
        Returns:
        the number of sessions
      • findBySid

        Session findBySid​(String sid)
        Retrieves the session of the given SID
        Parameters:
        sid - identifier of the session
        Returns:
        the session
      • findByNode

        List<Session> findByNode​(String node)
        Retrieves the session of the given node
        Parameters:
        node - the node
        Returns:
        the list of sessions
      • cleanOldSessions

        void cleanOldSessions​(int ttl)
        This method deletes all the session entries oldest than the given days since now. If ttl is 0 or -1, the deletion is not made.
        Parameters:
        ttl - The maximum number of days over which the session is considered old