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
        Description copied from class: AbstractLifeCycle
        Method to override to start the lifecycle
        Overrides:
        doStart in class AbstractLifeCycle
        Throws:
        AbstractLifeCycle.StopException - If thrown, the lifecycle will immediately be stopped.
        java.lang.Exception - If there was a problem starting. Will cause a transition to FAILED state
      • 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
        Description copied from class: AbstractLifeCycle
        Method to override to stop the lifecycle
        Overrides:
        doStop in class AbstractLifeCycle
        Throws:
        java.lang.Exception - If there was a problem stopping. Will cause a transition to FAILED state
      • 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