org.eclipse.jetty.server.session

Class HashSessionManager

  • All Implemented Interfaces:
    SessionManager, LifeCycle


    public class HashSessionManagerextends AbstractSessionManager
    HashSessionManager An in-memory implementation of SessionManager.

    This manager supports saving sessions to disk, either periodically or at shutdown. Sessions can also have their content idle saved to disk to reduce the memory overheads of large idle sessions.

    This manager will create it's own Timer instance to scavenge threads, unless it discovers a shared Timer instance set as the "org.eclipse.jetty.server.session.timer" attribute of the ContextHandler.

    • Constructor Detail

      • HashSessionManager

        public HashSessionManager()
    • Method Detail

      • getScavengePeriod

        public int getScavengePeriod()
        Returns:
        the period in seconds at which a check is made for sessions to be invalidated.
      • getIdleSavePeriod

        public int getIdleSavePeriod()
        Returns:
        seconds Idle period after which a session is saved
      • setIdleSavePeriod

        public void setIdleSavePeriod(int seconds)
        Configures the period in seconds after which a session is deemed idle and saved to save on session memory. The session is persisted, the values attribute map is cleared and the session set to idled.
        Parameters:
        seconds - Idle period after which a session is saved
      • setSavePeriod

        public void setSavePeriod(int seconds)
        Parameters:
        seconds - the period is seconds at which sessions are periodically saved to disk
      • getSavePeriod

        public int getSavePeriod()
        Returns:
        the period in seconds at which sessions are periodically saved to disk
      • setScavengePeriod

        public void setScavengePeriod(int seconds)
        Parameters:
        seconds - the period in seconds at which a check is made for sessions to be invalidated.
      • scavenge

        protected void scavenge()
        Find sessions that have timed out and invalidate them. This runs in the SessionScavenger thread.
      • getStoreDirectory

        public File getStoreDirectory()
      • setLazyLoad

        public void setLazyLoad(boolean lazyLoad)
      • isLazyLoad

        public boolean isLazyLoad()
      • isDeleteUnrestorableSessions

        public boolean isDeleteUnrestorableSessions()
      • setDeleteUnrestorableSessions

        public void setDeleteUnrestorableSessions(boolean deleteUnrestorableSessions)
      • saveSessions

        public void saveSessions(boolean reactivate)                  throws Exception
        Throws:
        Exception

Copyright © 1995-2013 Mort Bay Consulting. All Rights Reserved.



NOTHING
NOTHING
Add the Maven Dependecy to your project: maven dependecy for com.amazonaws : aws-java-sdk : 1.3.14