Carna Registration API Version 1.16.0
Public Member Functions | Static Public Attributes
CRA::LazyLocalizer Class Reference

Lazy proxy implementation of the Localizer interface. More...

#include <LazyLocalizer.h>

Inheritance diagram for CRA::LazyLocalizer:
Collaboration diagram for CRA::LazyLocalizer:

List of all members.

Public Member Functions

 LazyLocalizer (Localizer &service)
 Instantiates.
virtual bool fetch (const std::string &port, Transformation &out)
 Queries the bearing of the tool specified by some port.
void setLazynessThreshold (unsigned int lazynessThreshold)
 Defines the timeout of cache invalidation.
unsigned int getLazynessThreshold () const
 Tells the timeout of cache invalidation.

Static Public Attributes

static const unsigned int defaultLazynessThreshold
 Holds the default number of milliseconds spent before the cache is invalidated.

Detailed Description

Lazy proxy implementation of the Localizer interface.

Results returned by the referenced Localizer implementation are cached. Queries for cached data are processed without querying the referenced implementation, unless the cache was invalidated. The cache is invalidated when it's last update becomes too old.

Author:
Leonid Kostrykin
Date:
23.3.12 - 28.3.12

Definition at line 39 of file LazyLocalizer.h.


Member Function Documentation

unsigned int CRA::LazyLocalizer::getLazynessThreshold ( ) const [inline]

Tells the timeout of cache invalidation.

Returns:
timeout in milliseconds

Definition at line 71 of file LazyLocalizer.h.

void CRA::LazyLocalizer::setLazynessThreshold ( unsigned int  lazynessThreshold) [inline]

Defines the timeout of cache invalidation.

Parameters:
lazynessThresholdtimeout in milliseconds

Definition at line 61 of file LazyLocalizer.h.


The documentation for this class was generated from the following file:
 All Classes Functions Variables Enumerations Enumerator