Class DefaultSessionCache

    • Constructor Detail

      • DefaultSessionCache

        public DefaultSessionCache​(SessionHandler sessionHandler)
    • Method Detail

      • doGet

        public Session doGet​(java.lang.String id)
        Description copied from class: AbstractSessionCache
        Get the session matching the key.
        Specified by:
        doGet in class AbstractSessionCache
        Parameters:
        id - the session id
        Returns:
        the Session object matching the id
      • doPutIfAbsent

        public Session doPutIfAbsent​(java.lang.String id,
                                     Session session)
        Description copied from class: AbstractSessionCache
        Put the session into the map if it wasn't already there.
        Specified by:
        doPutIfAbsent in class AbstractSessionCache
        Parameters:
        id - the identity of the session
        session - the session object
        Returns:
        null if the session wasn't already in the map, or the existing entry otherwise
      • doDelete

        public Session doDelete​(java.lang.String id)
        Description copied from class: AbstractSessionCache
        Remove the session with this identity from the store.
        Specified by:
        doDelete in class AbstractSessionCache
        Parameters:
        id - the session id
        Returns:
        true if removed; false otherwise
      • doReplace

        public boolean doReplace​(java.lang.String id,
                                 Session oldValue,
                                 Session newValue)
        Description copied from class: AbstractSessionCache
        Replace the mapping from id to oldValue with newValue.
        Specified by:
        doReplace in class AbstractSessionCache
        Parameters:
        id - the session id
        oldValue - the old value
        newValue - the new value
        Returns:
        true if replacement was done
      • getSessionsCurrent

        public long getSessionsCurrent()
        Returns:
        the number of sessions in the cache
      • getSessionsMax

        public long getSessionsMax()
        Returns:
        the max number of sessions in the cache
      • getSessionsTotal

        public long getSessionsTotal()
        Description copied from interface: SessionCache
        Returns a running total of sessions in the cache.
        Returns:
        a running total of sessions in the cache
      • resetStats

        public void resetStats()
        Description copied from interface: SessionCache
        Resets the running total session count in the cache.
      • clear

        public void clear()