![]() |
VR-Forces 4.0.4 Class Documentation
|
This class helps DtVrfMessageInterface handle big messages. More...
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 DtSplitContentTimer & | operator= (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 |
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.
| typedef std::map<DtSplitMessageKey, DtTime> DtSplitContentTimer::DtTimeoutMap |
A collection of message ID and timeout time pairs.
Contructor.
| virtual DtSplitContentTimer::~DtSplitContentTimer | ( | ) | [virtual] |
destructor
| DtSplitContentTimer::DtSplitContentTimer | ( | const DtSplitContentTimer & | orig | ) | [protected] |
these aren't used
| 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
DtTime DtSplitContentTimer::myLastTimeoutCheckTime [protected] |
Referenced by lastTimeoutCheckTime(), and setLastTimeoutCheckTime().
DtTime DtSplitContentTimer::myTimeoutCheckInterval [protected] |
Referenced by setTimeoutCheckInterval(), and timeoutCheckInterval().
DtTime DtSplitContentTimer::myTimeoutDuration [protected] |
Referenced by setTimeoutDuration(), and timeoutDuration().
DtTimeoutMap DtSplitContentTimer::myTimeoutMap [protected] |
const DtTime DtSplitContentTimer::theDefaultTimeoutCheckInterval [static, protected] |
const DtTime DtSplitContentTimer::theDefaultTimeoutDuration [static, protected] |