java.lang.Object
org.eclipse.jetty.util.component.AbstractLifeCycle
org.eclipse.jetty.session.HouseKeeper
- All Implemented Interfaces:
org.eclipse.jetty.util.component.LifeCycle
@ManagedObject
public class HouseKeeper
extends org.eclipse.jetty.util.component.AbstractLifeCycle
There is 1 session HouseKeeper per SessionIdManager instance.
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
org.eclipse.jetty.util.component.AbstractLifeCycle.AbstractLifeCycleListener, org.eclipse.jetty.util.component.AbstractLifeCycle.StopExceptionNested classes/interfaces inherited from interface org.eclipse.jetty.util.component.LifeCycle
org.eclipse.jetty.util.component.LifeCycle.Listener -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected HouseKeeper.Runnerprotected org.eclipse.jetty.util.thread.Schedulerprotected SessionIdManagerprotected org.eclipse.jetty.util.thread.Scheduler.Taskstatic final longFields inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
FAILED, STARTED, STARTING, STOPPED, STOPPING -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddoStart()protected voiddoStop()longGet the period between scavenge cycles.voidscavenge()Periodically do session housekeepingvoidsetIntervalSec(long sec) Set the period between scavenge cyclesvoidsetSessionIdManager(SessionIdManager sessionIdManager) SessionIdManager associated with this scavengerprotected voidIf scavenging is not scheduled, schedule it.protected voidIf scavenging is scheduled, stop it.toString()Methods inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
addEventListener, getEventListeners, getState, getState, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeEventListener, setEventListeners, start, stop
-
Field Details
-
DEFAULT_PERIOD_MS
public static final long DEFAULT_PERIOD_MS- See Also:
-
_sessionIdManager
-
_scheduler
protected org.eclipse.jetty.util.thread.Scheduler _scheduler -
_task
protected org.eclipse.jetty.util.thread.Scheduler.Task _task -
_runner
-
_ownScheduler
protected boolean _ownScheduler
-
-
Constructor Details
-
HouseKeeper
public HouseKeeper()
-
-
Method Details
-
setSessionIdManager
SessionIdManager associated with this scavenger- Parameters:
sessionIdManager- the session id manager
-
doStart
-
startScavenging
-
stopScavenging
-
doStop
-
setIntervalSec
-
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 -
toString
- Overrides:
toStringin classorg.eclipse.jetty.util.component.AbstractLifeCycle
-