VR-Forces 4.0.4 Class Documentation
Public Types | Public Member Functions | Protected Attributes | Static Protected Attributes
DtSplitContentTimer Class Reference

This class helps DtVrfMessageInterface handle big messages. More...

List of all members.

Public Types

typedef std::map
< DtSplitMessageKey, DtTime > 
DtTimeoutMap
 A collection of message ID and timeout time pairs.

Public Member Functions

 DtSplitContentTimer ()
 Contructor.
virtual ~DtSplitContentTimer ()
 destructor
virtual void addTimeoutEntry (const DtSplitMessageKey &key, DtTime startTime)
 Start a timer for the given key.
virtual void clear ()
 remove all entries.
virtual void evaluateTimeouts (DtTime timeNow, DtSplitContentExpiredFcn pFcn, void *pUsr)
 Walk through the DtTimeoutMap, invoke DtSplitContentExpiredFcn for things needing to be purged.
virtual bool findEntry (const DtSplitMessageKey &key, DtTime &retTime)
 returns true if entry found, with expiration time returned in retTime.
virtual void removeTimeoutEntry (const DtSplitMessageKey &key)
 searches for an entry matching key, removes it.
virtual DtTime lastTimeoutCheckTime () const
 returns the last time a full check was made.
virtual void setLastTimeoutCheckTime (DtTime nTime)
 returns the last time a full check was made.
virtual DtTime timeoutCheckInterval () const
 time, in seconds, that the collection should be revisited for evaluation.
virtual void setTimeoutCheckInterval (DtTime nSecs)
 time, in seconds, that the collection should be revisited for evaluation.
virtual DtTime timeoutDuration () const
 time, in seconds, before an entry is considered expired.
virtual void setTimeoutDuration (DtTime nSecs)
 time, in seconds, before an entry is considered expired.

Protected Member Functions

 DtSplitContentTimer (const DtSplitContentTimer &orig)
 these aren't used
const DtSplitContentTimeroperator= (const DtSplitContentTimer &orig)
 these aren't used

Protected Attributes

DtTime myLastTimeoutCheckTime
DtTime myTimeoutCheckInterval
DtTime myTimeoutDuration
DtTimeoutMap myTimeoutMap

Static Protected Attributes

static const DtTime theDefaultTimeoutCheckInterval
static const DtTime theDefaultTimeoutDuration

Detailed Description

This class helps DtVrfMessageInterface handle big messages.

DtSplitContentTimer is a simple class that helps track when messages should be purged. Classes like DtVrfMessageInterface and DtSignalMessageTransporter gather multiple chunks of message content. DtSplitContentTimer is used to track when those chunks first arrive. If a full sequence of content fails to arrive by expiration time, DtSplitContentTimer will signal the expiration of those content chunks.


Member Typedef Documentation

A collection of message ID and timeout time pairs.


Constructor & Destructor Documentation

Contructor.

destructor

these aren't used


Member Function Documentation

virtual void DtSplitContentTimer::addTimeoutEntry ( const DtSplitMessageKey key,
DtTime  startTime 
) [virtual]

Start a timer for the given key.

Starts a timer for the given key. Expiration time is computed as startTime + myTimeoutDuration

virtual void DtSplitContentTimer::clear ( ) [virtual]

remove all entries.

virtual void DtSplitContentTimer::evaluateTimeouts ( DtTime  timeNow,
DtSplitContentExpiredFcn  pFcn,
void *  pUsr 
) [virtual]

Walk through the DtTimeoutMap, invoke DtSplitContentExpiredFcn for things needing to be purged.

Caller should pass a valid DtSplitContentExpiredFcn to pFcn, and (this) to pUsr. It's up to the caller to invoke removeTimeoutEntry(). Note, if timeNow is not >= myLastTimeoutCheckTime+myTimeoutCheckInterval, the call will be ignored.

virtual bool DtSplitContentTimer::findEntry ( const DtSplitMessageKey key,
DtTime &  retTime 
) [virtual]

returns true if entry found, with expiration time returned in retTime.

DtTime DtSplitContentTimer::lastTimeoutCheckTime ( ) const [inline, virtual]

returns the last time a full check was made.

References myLastTimeoutCheckTime.

void DtSplitContentTimer::setLastTimeoutCheckTime ( DtTime  nTime) [inline, virtual]

returns the last time a full check was made.

References myLastTimeoutCheckTime.

DtTime DtSplitContentTimer::timeoutCheckInterval ( ) const [inline, virtual]

time, in seconds, that the collection should be revisited for evaluation.

References myTimeoutCheckInterval.

void DtSplitContentTimer::setTimeoutCheckInterval ( DtTime  nSecs) [inline, virtual]

time, in seconds, that the collection should be revisited for evaluation.

References myTimeoutCheckInterval.

DtTime DtSplitContentTimer::timeoutDuration ( ) const [inline, virtual]

time, in seconds, before an entry is considered expired.

References myTimeoutDuration.

void DtSplitContentTimer::setTimeoutDuration ( DtTime  nSecs) [inline, virtual]

time, in seconds, before an entry is considered expired.

References myTimeoutDuration.

virtual void DtSplitContentTimer::removeTimeoutEntry ( const DtSplitMessageKey key) [virtual]

searches for an entry matching key, removes it.

const DtSplitContentTimer& DtSplitContentTimer::operator= ( const DtSplitContentTimer orig) [protected]

these aren't used


Member Data Documentation

const DtTime DtSplitContentTimer::theDefaultTimeoutCheckInterval [static, protected]
const DtTime DtSplitContentTimer::theDefaultTimeoutDuration [static, protected]

The documentation for this class was generated from the following file:

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)