Package org.eclipse.jetty.server.session
Class HouseKeeper
java.lang.Object
org.eclipse.jetty.util.component.AbstractLifeCycle
org.eclipse.jetty.server.session.HouseKeeper
- All Implemented Interfaces:
LifeCycle
HouseKeeper
There is 1 session HouseKeeper per SessionIdManager instance.
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
AbstractLifeCycle.AbstractLifeCycleListener
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.LifeCycle
LifeCycle.Listener
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate long
protected boolean
protected HouseKeeper.Runner
protected Scheduler
protected SessionIdManager
protected Scheduler.Task
static final long
private static final Logger
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
doStart()
protected void
doStop()
long
Get the period between scavenge cycles.void
scavenge()
Periodically do session housekeepingvoid
setIntervalSec
(long sec) Set the period between scavenge cyclesvoid
setSessionIdManager
(SessionIdManager sessionIdManager) SessionIdManager associated with this scavengerprotected void
If scavenging is not scheduled, schedule it.protected void
If scavenging is scheduled, stop it.toString()
Methods inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
addLifeCycleListener, getState, getState, getStopTimeout, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, setStopTimeout, start, stop
-
Field Details
-
LOG
-
DEFAULT_PERIOD_MS
public static final long DEFAULT_PERIOD_MS- See Also:
-
_sessionIdManager
-
_scheduler
-
_task
-
_runner
-
_ownScheduler
protected boolean _ownScheduler -
_intervalMs
private long _intervalMs
-
-
Constructor Details
-
HouseKeeper
public HouseKeeper()
-
-
Method Details
-
setSessionIdManager
SessionIdManager associated with this scavenger- Parameters:
sessionIdManager
- the session id manager
-
doStart
- Overrides:
doStart
in classAbstractLifeCycle
- Throws:
Exception
-
startScavenging
If scavenging is not scheduled, schedule it.- Throws:
Exception
- if any error during scheduling the scavenging
-
stopScavenging
If scavenging is scheduled, stop it.- Throws:
Exception
- if any error during stopping the scavenging
-
doStop
- Overrides:
doStop
in classAbstractLifeCycle
- Throws:
Exception
-
setIntervalSec
Set the period between scavenge cycles- Parameters:
sec
- the interval (in seconds)- Throws:
Exception
- if any error during restarting the scavenging
-
getIntervalSec
Get the period between scavenge cycles.- Returns:
- the interval (in seconds)
-
scavenge
public void scavenge()Periodically do session housekeeping -
toString
- Overrides:
toString
in classAbstractLifeCycle
-