TimerThreadClient Class Reference

TimerThreadClient receives callbacks from a TimerThread. More...

#include <TimerThread.h>

Inheritance diagram for TimerThreadClient:

ThreadTracker CacheImpl< PageT, VictimPolicyT > StatsTimer List of all members.

Public Member Functions

virtual ~TimerThreadClient ()
virtual uint getTimerIntervalMillis ()=0
 Calculates the interval which should elapse before the next call to onTimerInterval.
virtual void onTimerInterval ()=0
 Receives notification from TimerThread that interval has elapsed.
virtual void onThreadStart ()
 Called in new thread context before thread's body runs.
virtual void onThreadEnd ()
 Called in thread context after thread's body runs.
virtual FennelExcncloneExcn (std::exception &ex)
 Clones an exception so that it can be rethrown in a different thread context.

Detailed Description

TimerThreadClient receives callbacks from a TimerThread.

Definition at line 36 of file TimerThread.h.


Constructor & Destructor Documentation

TimerThreadClient::~TimerThreadClient (  )  [virtual]

Definition at line 87 of file TimerThread.cpp.

00088 {
00089 }


Member Function Documentation

virtual uint TimerThreadClient::getTimerIntervalMillis (  )  [pure virtual]

Calculates the interval which should elapse before the next call to onTimerInterval.

This can be different each time. A return value of 0 will cause the TimerThread to cease calling back.

Implemented in CacheImpl< PageT, VictimPolicyT >, and StatsTimer.

Referenced by TimerThread::run().

virtual void TimerThreadClient::onTimerInterval (  )  [pure virtual]

Receives notification from TimerThread that interval has elapsed.

Implemented in CacheImpl< PageT, VictimPolicyT >, and StatsTimer.

Referenced by TimerThread::run().

void ThreadTracker::onThreadStart (  )  [virtual, inherited]

Called in new thread context before thread's body runs.

Reimplemented in JavaThreadTracker, and StatsTimer.

Definition at line 33 of file ThreadTracker.cpp.

Referenced by TimerThread::run(), and ThreadPoolBase::runPooledThread().

00034 {
00035     // do nothing by default
00036 }

void ThreadTracker::onThreadEnd (  )  [virtual, inherited]

Called in thread context after thread's body runs.

Reimplemented in JavaThreadTracker, and StatsTimer.

Definition at line 38 of file ThreadTracker.cpp.

Referenced by TimerThread::run(), and ThreadPoolBase::runPooledThread().

00039 {
00040     // do nothing by default
00041 }

FennelExcn * ThreadTracker::cloneExcn ( std::exception &  ex  )  [virtual, inherited]

Clones an exception so that it can be rethrown in a different thread context.

Parameters:
ex the excn to be cloned
Returns:
cloned excn

Reimplemented in JavaThreadTracker.

Definition at line 43 of file ThreadTracker.cpp.

Referenced by JavaThreadTracker::cloneExcn(), and ParallelExecStreamScheduler::executeTask().

00044 {
00045     return new FennelExcn(ex.what());
00046 }


The documentation for this class was generated from the following files:
Generated on Mon Jun 22 04:00:48 2009 for Fennel by  doxygen 1.5.1