![]() |
VR-Forces 5.0.3 Developer's Guide
|
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.
Public Types | |
| typedef std::map < DtSplitMessageKey, DtTime > | DtTimeoutMap |
Public Member Functions | |
| DtSplitContentTimer () | |
| virtual | ~DtSplitContentTimer () |
| virtual void | addTimeoutEntry (const DtSplitMessageKey &key, DtTime startTime) |
| virtual void | clear () |
| virtual void | evaluateTimeouts (DtTime timeNow, DtSplitContentExpiredFcn pFcn, void *pUsr) |
| virtual bool | findEntry (const DtSplitMessageKey &key, DtTime &retTime) |
| virtual void | removeTimeoutEntry (const DtSplitMessageKey &key) |
| virtual DtTime | lastTimeoutCheckTime () const |
| virtual void | setLastTimeoutCheckTime (DtTime nTime) |
| virtual DtTime | timeoutCheckInterval () const |
| virtual void | setTimeoutCheckInterval (DtTime nSecs) |
| virtual DtTime | timeoutDuration () const |
| virtual void | setTimeoutDuration (DtTime nSecs) |
Protected Member Functions | |
| DtSplitContentTimer (const DtSplitContentTimer &orig) | |
| const DtSplitContentTimer & | operator= (const DtSplitContentTimer &orig) |
Protected Attributes | |
| DtTime | myLastTimeoutCheckTime |
| DtTime | myTimeoutCheckInterval |
| DtTime | myTimeoutDuration |
| DtTimeoutMap | myTimeoutMap |
Static Protected Attributes | |
| static const DtTime | theDefaultTimeoutCheckInterval |
| static const DtTime | theDefaultTimeoutDuration |
| typedef std::map<DtSplitMessageKey, DtTime> DtSplitContentTimer::DtTimeoutMap |
A collection of message ID and timeout time pairs.
| DtSplitContentTimer::DtSplitContentTimer | ( | ) |
Contructor.
|
virtual |
destructor
|
protected |
these aren't used
|
virtual |
Start a timer for the given key. Starts a timer for the given key. Expiration time is computed as startTime + myTimeoutDuration.
|
virtual |
remove all entries.
|
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 |
returns true if entry found, with expiration time returned in retTime.
|
inlinevirtual |
returns the last time a full check was made.
References myLastTimeoutCheckTime.
|
inlinevirtual |
returns the last time a full check was made.
References myLastTimeoutCheckTime.
|
inlinevirtual |
time, in seconds, that the collection should be revisited for evaluation.
References myTimeoutCheckInterval.
|
inlinevirtual |
time, in seconds, that the collection should be revisited for evaluation.
References myTimeoutCheckInterval.
|
inlinevirtual |
time, in seconds, before an entry is considered expired.
References myTimeoutDuration.
|
inlinevirtual |
time, in seconds, before an entry is considered expired.
References myTimeoutDuration.
|
virtual |
searches for an entry matching key, removes it.
|
protected |
these aren't used
|
protected |
Referenced by lastTimeoutCheckTime(), and setLastTimeoutCheckTime().
|
protected |
Referenced by setTimeoutCheckInterval(), and timeoutCheckInterval().
|
protected |
Referenced by setTimeoutDuration(), and timeoutDuration().
|
protected |
|
staticprotected |
|
staticprotected |