public abstract class AbstractReapTask extends Object implements Runnable
Modifier and Type | Field and Description |
---|---|
protected long |
mStartTime
The time stamp for when this reap cycle started.
|
Constructor and Description |
---|
AbstractReapTask(SessionHelper sessionHelper, SessionReaperStatistics statistics, Iterator iterIds)
Construct an AbstractReapTask.
|
Modifier and Type | Method and Description |
---|---|
protected void |
checkAndInvalidate(String id)
Check the specified session to see if it has expired, and in that case invalidate it.
|
protected void |
done()
Indicate that the reaping is done in this cycle.
|
protected SessionHelper.SessionReaperDaemon |
getDaemon() |
protected int |
getNrOfInvalidatedSessions() |
protected SessionHelper |
getSessionHelper() |
protected Iterator |
getSessionIdIterator() |
protected boolean |
isDone() |
protected abstract void |
reap()
The method that implements the actual reaping.
|
void |
run()
The task process: Process a portion of the reaping cycle.
|
protected void |
scheduleNextCycle()
Schedules the next reaping cycle.
|
public AbstractReapTask(SessionHelper sessionHelper, SessionReaperStatistics statistics, Iterator iterIds)
iterIds
- an iterator of session IDs to checksessionHelper
-public void run()
protected void scheduleNextCycle()
protected void done()
protected abstract void reap()
protected Iterator getSessionIdIterator()
protected void checkAndInvalidate(String id)
id
- a session idprotected SessionHelper getSessionHelper()
protected SessionHelper.SessionReaperDaemon getDaemon()
protected boolean isDone()
protected int getNrOfInvalidatedSessions()