Class HouseKeeper

    • Constructor Detail

      • HouseKeeper

        public HouseKeeper()
    • Method Detail

      • setSessionIdManager

        public void setSessionIdManager​(SessionIdManager sessionIdManager)
        SessionIdManager associated with this scavenger
        Parameters:
        sessionIdManager - the session id manager
      • doStart

        protected void doStart()
                        throws java.lang.Exception
        Overrides:
        doStart in class AbstractLifeCycle
        Throws:
        java.lang.Exception
      • startScavenging

        protected void startScavenging()
                                throws java.lang.Exception
        If scavenging is not scheduled, schedule it.
        Throws:
        java.lang.Exception - if any error during scheduling the scavenging
      • stopScavenging

        protected void stopScavenging()
                               throws java.lang.Exception
        If scavenging is scheduled, stop it.
        Throws:
        java.lang.Exception - if any error during stopping the scavenging
      • doStop

        protected void doStop()
                       throws java.lang.Exception
        Overrides:
        doStop in class AbstractLifeCycle
        Throws:
        java.lang.Exception
      • setIntervalSec

        public void setIntervalSec​(long sec)
                            throws java.lang.Exception
        Set the period between scavenge cycles
        Parameters:
        sec - the interval (in seconds)
        Throws:
        java.lang.Exception - if any error during restarting the scavenging
      • getIntervalSec

        @ManagedAttribute(value="secs between scavenge cycles",
                          readonly=true)
        public long getIntervalSec()
        Get the period between scavenge cycles.
        Returns:
        the interval (in seconds)
      • scavenge

        public void scavenge()
        Periodically do session housekeeping