|
Oracle® Coherence Java API Reference Release 3.7.1.0 E22843-01 |
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object
com.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 |
class |
SessionHelper.SessionReaperDaemon.StartReapingTaskA 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(java.lang.String sName, int nPriority)Construct a SessionReaperDaemon. |
|
| Method Summary | |
|---|---|
long |
getAverageReapDuration()Gets the average reap duration since the statistics was reset. |
long |
getAverageReapedSessions()Gets the average number of reaped sessions in a reap cycle since the statistics was reset. |
int |
getEstimatedReaperSessionCount()Determine the estimated number of sessions that will be reaped by the reaper when it runs next. |
long |
getLastReapDuration()Gets the duration for the last reap cycle. |
long |
getLastReapTime()Determine the last time that session reaping started. |
long |
getMaxReapDuration()Gets the maximum reap duration since the statistics was reset. |
long |
getMaxReapedSessions()Gets the maximum number of sessions reaped in a reap cycle since the statistics was reset. |
long |
getNextReapTime()Gets the start time for the next reap cycle. |
long |
getReapedSessions()Gets the number of sessions that were reaped during the last reap cycle. |
int |
getTotalReapCycles()Determine the total number of reaping cycles that this node has performed. |
long |
getTotalReapedSessions()Gets the number of sessions that were reaped since the statistics was reset. |
void |
incTotalReapCycles()Increment the total number of reaping cycles that this node has performed. |
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(java.lang.Throwable e, java.lang.Runnable task)Process an exception that is thrown during a task execution. |
void |
resetStatistics()Resets the statistics held by this object. |
void |
run()The task process: Process a portion of the reaping cycle. |
void |
scheduleTask(java.lang.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 |
setLastReapDuration(long time)Sets the duration for the last reap cycle. |
void |
setLastReapTime(long dt)Update the last time that session reaping started. |
void |
setNextReapTime(long d)Sets the start time for the next reap cycle. |
void |
setReapedSessions(long l)Sets the number of sessions that were reaped during the last reap cycle. |
| 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, finishStarting, finishStopping, getConfiguredName, getConfiguredPriority, getContext, getGuardRegisterAction, getMaxWaitMillis, getState, getThread, getThreadContextClassLoader, getWorker, guardIfNeeded, heartbeat, heartbeat, instantiateWorker, isGuarded, isOnWorkerThread, isRunning, isStopping, recover, setConfiguredName, setConfiguredPriority, setContext, setGuardPolicy, setGuardRegisterAction, setThreadContextClassLoader, shutdown, start, stop, terminate, toStateString |
| Constructor Detail |
|---|
public SessionHelper.SessionReaperDaemon(java.lang.String sName,
int nPriority)
sName - the daemon namenPriority - the daemon priority| Method Detail |
|---|
public void scheduleTask(java.lang.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 java.lang.Runnablerun in class TaskDaemonThread.run()
protected void onException(java.lang.Throwable e,
java.lang.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 int getTotalReapCycles()
public void incTotalReapCycles()
protected boolean isFullReapDue()
public long getLastReapDuration()
getLastReapDuration in interface SessionReaperStatisticspublic void setLastReapDuration(long time)
setLastReapDuration in interface SessionReaperStatisticstime - The duration in milliseconds.public long getReapedSessions()
getReapedSessions in interface SessionReaperStatisticspublic void setReapedSessions(long l)
setReapedSessions in interface SessionReaperStatisticsl - The number of sessions.public long getTotalReapedSessions()
getTotalReapedSessions in interface SessionReaperStatisticspublic long getLastReapTime()
getLastReapTime in interface SessionReaperStatisticspublic void setLastReapTime(long dt)
setLastReapTime in interface SessionReaperStatisticsdt - the last time that session reaping startedpublic long getNextReapTime()
getNextReapTime in interface SessionReaperStatisticspublic void setNextReapTime(long d)
setNextReapTime in interface SessionReaperStatisticsd - The time in milliseconds when the next reap cycle is schedule to start.public long getAverageReapDuration()
getAverageReapDuration in interface SessionReaperStatisticspublic long getAverageReapedSessions()
getAverageReapedSessions in interface SessionReaperStatisticspublic long getMaxReapDuration()
getMaxReapDuration in interface SessionReaperStatisticspublic long getMaxReapedSessions()
getMaxReapedSessions in interface SessionReaperStatisticspublic void resetStatistics()
resetStatistics in interface SessionReaperStatisticspublic SessionHelper.SessionReaperDaemon.StartReapingTask instantiateStartReapingTask()
|
Oracle® Coherence Java API Reference Release 3.7.1.0 E22843-01 |
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||