(file) Return to ObjectCache.h CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / Repository

Diff for /pegasus/src/Pegasus/Repository/ObjectCache.h between version 1.7 and 1.8

version 1.7, 2006/11/14 18:34:58 version 1.8, 2007/01/10 22:05:56
Line 133 
Line 133 
     if (_maxEntries == 0)     if (_maxEntries == 0)
         return;         return;
  
     _mutex.lock();      AutoMutex lock(_mutex);
  
     //// Update object if it is already in cache:     //// Update object if it is already in cache:
  
Line 146 
Line 146 
         {         {
             // Update the repository.             // Update the repository.
             p->object = object.clone();             p->object = object.clone();
             _mutex.unlock();  
             return;             return;
         }         }
     }     }
Line 215 
Line 214 
     _cacheRemoveLRU++;     _cacheRemoveLRU++;
 #endif #endif
     }     }
   
     _mutex.unlock();  
     return;  
 } }
  
 template<class OBJECT> template<class OBJECT>
Line 226 
Line 222 
     if (_maxEntries == 0)     if (_maxEntries == 0)
         return false;         return false;
  
     _mutex.lock();      AutoMutex lock(_mutex);
  
     //// Search cache for object.     //// Search cache for object.
  
Line 241 
Line 237 
 #ifdef PEGASUS_DEBUG #ifdef PEGASUS_DEBUG
         _cacheReadHit++;         _cacheReadHit++;
 #endif #endif
             _mutex.unlock();  
             return true;             return true;
         }         }
     }     }
Line 251 
Line 246 
 #ifdef PEGASUS_DEBUG #ifdef PEGASUS_DEBUG
     _cacheReadMiss++;     _cacheReadMiss++;
 #endif #endif
     _mutex.unlock();  
     return false;     return false;
 } }
  
Line 261 
Line 255 
     if (_maxEntries == 0)     if (_maxEntries == 0)
         return false;         return false;
  
     _mutex.lock();      AutoMutex lock(_mutex);
  
     //// Find and remove the given element.     //// Find and remove the given element.
  
Line 297 
Line 291 
             delete p;             delete p;
             _numEntries--;             _numEntries--;
  
             _mutex.unlock();  
             return true;             return true;
         }         }
  
Line 306 
Line 299 
  
     //// Not found!     //// Not found!
  
     _mutex.unlock();  
     return false;     return false;
 } }
  


Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2