|
CoherenceTM v3.3 Copyright© 2000-2007 by Oracle Corporation |
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.tangosol.util.Base
com.tangosol.util.Daemon
com.tangosol.util.TaskDaemon
com.tangosol.coherence.servlet.SessionHelper.SessionReaperDaemon
public class SessionHelper.SessionReaperDaemon
A daemon thread class that will clean up expired sessions.
| Nested Class Summary | |
|---|---|
class |
SessionHelper.SessionReaperDaemon.IncrementalReapTask
A task that starts a reaping cycle. |
class |
SessionHelper.SessionReaperDaemon.StartReapingTask
A task that starts a reaping cycle. |
| Nested classes/interfaces inherited from class com.tangosol.util.TaskDaemon |
|---|
TaskDaemon.PeriodicTask |
| Nested classes/interfaces inherited from class com.tangosol.util.Daemon |
|---|
Daemon.DaemonWorker |
| Constructor Summary | |
|---|---|
SessionHelper.SessionReaperDaemon(String sName,
int nPriority)
Construct a SessionReaperDaemon. |
|
| Method Summary | |
|---|---|
int |
getEstimatedReaperSessionCount()
Determine the estimated number of sessions that will be reaped by the reaper when it runs next. |
long |
getLastReapTime()
Determine the last time that session reaping started. |
int |
getTotalReapCycles()
Determine the total number of reaping cycles that this node has performed. |
void |
incTotalReapCycles()
Increment the total number of reaping cycles that this node has performed. |
SessionHelper.SessionReaperDaemon.IncrementalReapTask |
instantiateIncrementalReapTask(Iterator iterIds,
int cEstimatedSessions)
Factory method: Instantiate a task that incrementally reaps sessions (checks for and invalidates expired sessions). |
SessionHelper.SessionReaperDaemon.StartReapingTask |
instantiateStartReapingTask()
Factory method: Instantiate a task that starts a reaping cycle. |
protected boolean |
isFullReapDue()
Determine if this node should run a full reaper scan. |
protected void |
onException(Throwable e,
Runnable task)
Process an exception that is thrown during a task execution. |
void |
run()
The task process: Process a portion of the reaping cycle. |
void |
scheduleTask(Runnable task,
long ldt)
Schedule a task to be run at the specified time, or as soon after as possible. |
void |
setEstimatedReaperSessionCount(int c)
Update the estimated number of sessions that will be reaped by the reaper when it runs next. |
void |
setLastReapTime(long dt)
Update the last time that session reaping started. |
| Methods inherited from class com.tangosol.util.TaskDaemon |
|---|
executePeriodicTask, executeTask, getDescription, getIdleTimeout, getMostRecentTaskTime, getTasks, instantiatePeriodicTask, isFinishing, run, schedulePeriodicTask, setFinishing, setIdleTimeout, stop, takeNextRipeTask, toString, updateMostRecentTaskTime |
| Methods inherited from class com.tangosol.util.Daemon |
|---|
changeState, configureWorker, getConfiguredName, getConfiguredPriority, getState, getThread, getThreadContextClassLoader, getWorker, instantiateWorker, isOnWorkerThread, isRunning, isStopping, setConfiguredName, setConfiguredPriority, setThreadContextClassLoader, start, stop, toStateString |
| Constructor Detail |
|---|
public SessionHelper.SessionReaperDaemon(String sName,
int nPriority)
sName - the daemon namenPriority - the daemon priority| Method Detail |
|---|
public void scheduleTask(Runnable task,
long ldt)
scheduleTask in class TaskDaemontask - a Runnable object to invokeldt - a datetime value at which to run the taskpublic void run()
run in interface Runnablerun in class TaskDaemon
protected void onException(Throwable e,
Runnable task)
onException in class TaskDaemone - Throwable object (a RuntimeException or an Error)task - the task that caused the exceptionpublic int getEstimatedReaperSessionCount()
public void setEstimatedReaperSessionCount(int c)
c - the number of sessions that were reaped by the previous
reap cyclepublic long getLastReapTime()
public void setLastReapTime(long dt)
dt - the last time that session reaping startedpublic int getTotalReapCycles()
public void incTotalReapCycles()
protected boolean isFullReapDue()
public SessionHelper.SessionReaperDaemon.StartReapingTask instantiateStartReapingTask()
public SessionHelper.SessionReaperDaemon.IncrementalReapTask instantiateIncrementalReapTask(Iterator iterIds,
int cEstimatedSessions)
iterIds - an iterator of session IDs to checkcEstimatedSessions - the estimated number of session IDs
to check
|
CoherenceTM v3.3 Copyright© 2000-2007 by Oracle Corporation |
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||