Class HibernateSessionDAO

    • Method Detail

      • deleteCurrentNodeSessions

        public void deleteCurrentNodeSessions()
        Description copied from interface: SessionDAO
        Removes all the sessions that refers to the current node
        Specified by:
        deleteCurrentNodeSessions in interface SessionDAO
      • countSessions

        public int countSessions​(Long tenantId,
                                 Integer status)
        Description copied from interface: SessionDAO
        Counts the number of sessions.
        Specified by:
        countSessions in interface SessionDAO
        Parameters:
        tenantId - The tenant (optional)
        status - The current status (optional)
        Returns:
        the number of sessions
      • findBySid

        public Session findBySid​(String sid)
        Description copied from interface: SessionDAO
        Retrieves the session of the given SID
        Specified by:
        findBySid in interface SessionDAO
        Parameters:
        sid - identifier of the session
        Returns:
        the session
      • findByNode

        public List<Session> findByNode​(String node)
        Description copied from interface: SessionDAO
        Retrieves the session of the given node
        Specified by:
        findByNode in interface SessionDAO
        Parameters:
        node - the node
        Returns:
        the list of sessions
      • cleanOldSessions

        public void cleanOldSessions​(int ttl)
        Description copied from interface: SessionDAO
        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.
        Specified by:
        cleanOldSessions in interface SessionDAO
        Parameters:
        ttl - The maximum number of days over which the session is considered old