Class AbstractReapTask

java.lang.Object
com.tangosol.coherence.servlet.AbstractReapTask
All Implemented Interfaces:
Runnable
Direct Known Subclasses:
IncrementalReapTask, ParallelReapTask

public abstract class AbstractReapTask extends Object implements Runnable
Base class for reaping tasks. It takes care of scheduling the next reap cycle and provides common data members.
  • Field Details

    • mStartTime

      protected long mStartTime
      The time stamp for when this reap cycle started.
    • mQueueWaitTime

      protected long mQueueWaitTime
      The amount of time the reap task waited in-queue to run.
  • Constructor Details

    • AbstractReapTask

      public AbstractReapTask(SessionHelper sessionHelper, SessionReaperStatistics statistics, Iterator iterIds)
      Construct an AbstractReapTask.
      Parameters:
      sessionHelper - a session helper
      statistics - a session reaper statistics
      iterIds - an iterator of session IDs to check
  • Method Details

    • run

      public void run()
      The task process: Process a portion of the reaping cycle.
      Specified by:
      run in interface Runnable
    • scheduleNextCycle

      protected void scheduleNextCycle()
      Schedules the next reaping cycle.
    • done

      protected void done()
      Indicate that the reaping is done in this cycle.
    • reap

      protected abstract void reap()
      The method that implements the actual reaping.
    • getSessionIdIterator

      protected Iterator getSessionIdIterator()
    • checkAndInvalidate

      protected void checkAndInvalidate(String id)
      Check the specified session to see if it has expired, and in that case invalidate it.
      Parameters:
      id - a session id
    • getSessionHelper

      protected SessionHelper getSessionHelper()
    • getDaemon

      protected SessionHelper.SessionReaperDaemon getDaemon()
    • isDone

      protected boolean isDone()
    • getNrOfInvalidatedSessions

      protected int getNrOfInvalidatedSessions()
    • logInvalidationExceptions

      protected boolean logInvalidationExceptions()