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
      • findScheduler

        protected void findScheduler()
                              throws java.lang.Exception
        Get a scheduler. First try a common scheduler, failing that create our own.
        Throws:
        java.lang.Exception - when the scheduler cannot be started
      • 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
      • 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