osgEarth 2.1.1
|
Public Member Functions | |
AsyncUpdateAccessTimePool (const std::string &cacheId, Sqlite3Cache *cache) | |
void | addEntry (const TileKey &key, int timeStamp) |
void | addEntryInternal (const TileKey &key) |
void | operator() (ProgressCallback *progress) |
const std::string & | getCacheId () |
int | getNbEntry () const |
Public Attributes | |
std::map< std::string, int > | _keys |
std::string | _cacheId |
std::string | _keyStr |
int | _timeStamp |
osg::observer_ptr< Sqlite3Cache > | _cache |
Definition at line 983 of file Sqlite3Cache.cpp.
AsyncUpdateAccessTimePool::AsyncUpdateAccessTimePool | ( | const std::string & | cacheId, |
Sqlite3Cache * | cache | ||
) |
Definition at line 1694 of file Sqlite3Cache.cpp.
void AsyncUpdateAccessTimePool::addEntry | ( | const TileKey & | key, |
int | timeStamp | ||
) |
Definition at line 1700 of file Sqlite3Cache.cpp.
{ unsigned int lod = key.getLevelOfDetail(); addEntryInternal(key); if (lod > 0) { TileKey previous = key; for (int i = (int)lod-1; i >= 0; --i) { TileKey ancestor = previous.createAncestorKey(i); if (ancestor.valid()) addEntryInternal(ancestor); previous = ancestor; } } _timeStamp = timeStamp; }
void AsyncUpdateAccessTimePool::addEntryInternal | ( | const TileKey & | key | ) |
Definition at line 1716 of file Sqlite3Cache.cpp.
{ const std::string& keyStr = key.str(); if (_keys.find(keyStr) == _keys.end()) { _keys[keyStr] = 1; if (_keyStr.empty()) _keyStr = keyStr; else _keyStr += ", " + keyStr; } }
const std::string& AsyncUpdateAccessTimePool::getCacheId | ( | ) | [inline] |
Definition at line 990 of file Sqlite3Cache.cpp.
{ return _cacheId; }
int AsyncUpdateAccessTimePool::getNbEntry | ( | ) | const [inline] |
Definition at line 991 of file Sqlite3Cache.cpp.
{ return _keys.size(); }
void AsyncUpdateAccessTimePool::operator() | ( | ProgressCallback * | progress | ) | [virtual] |
Implements osgEarth::TaskRequest.
Definition at line 1728 of file Sqlite3Cache.cpp.
{ osg::ref_ptr<Sqlite3Cache> cache = _cache.get(); if ( cache.valid() ) { //OE_INFO << "AsyncUpdateAccessTimePool will process " << _keys.size() << std::endl; cache->updateAccessTimeSyncPool( _cacheId, _keyStr , _timeStamp ); } }
osg::observer_ptr<Sqlite3Cache> AsyncUpdateAccessTimePool::_cache |
Definition at line 996 of file Sqlite3Cache.cpp.
std::string AsyncUpdateAccessTimePool::_cacheId |
Definition at line 993 of file Sqlite3Cache.cpp.
std::map<std::string, int> AsyncUpdateAccessTimePool::_keys |
Definition at line 992 of file Sqlite3Cache.cpp.
std::string AsyncUpdateAccessTimePool::_keyStr |
Definition at line 994 of file Sqlite3Cache.cpp.
Definition at line 995 of file Sqlite3Cache.cpp.