xmltooling 1.6.0
|
Helper class on top of StorageService for detecting message replay. More...
#include <xmltooling/util/ReplayCache.h>
Public Member Functions | |
ReplayCache (StorageService *storage=nullptr) | |
Creates a replay cache on top of a particular StorageService. | |
virtual bool | check (const char *context, const char *s, time_t expires) |
Returns true iff the check value is not found in the cache, and stores it. | |
bool | check (const char *context, const XMLCh *s, time_t expires) |
Returns true iff the check value is not found in the cache, and stores it. |
Helper class on top of StorageService for detecting message replay.
xmltooling::ReplayCache::ReplayCache | ( | StorageService * | storage = nullptr | ) |
Creates a replay cache on top of a particular StorageService.
The lifetime of the StorageService MUST be longer than the lifetime of the ReplayCache.
storage | pointer to a StorageService, or nullptr to keep cache in memory |
virtual bool xmltooling::ReplayCache::check | ( | const char * | context, |
const char * | s, | ||
time_t | expires | ||
) | [virtual] |
Returns true iff the check value is not found in the cache, and stores it.
context | a context label to subdivide the cache |
s | value to check |
expires | time for disposal of value from cache |
bool xmltooling::ReplayCache::check | ( | const char * | context, |
const XMLCh * | s, | ||
time_t | expires | ||
) |
Returns true iff the check value is not found in the cache, and stores it.
context | a context label to subdivide the cache |
s | value to check |
expires | time for disposal of value from cache |