(file) Return to EnumerationContext.cpp CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / Server

Diff for /pegasus/src/Pegasus/Server/EnumerationContext.cpp between version 1.9 and 1.10

version 1.9, 2015/01/01 16:04:51 version 1.10, 2015/01/04 22:52:35
Line 46 
Line 46 
 PEGASUS_USING_STD; PEGASUS_USING_STD;
 PEGASUS_NAMESPACE_BEGIN PEGASUS_NAMESPACE_BEGIN
  
   // General class to process various objects that are made up of Pegaus
   // Strings back to the String and more directly to the const char* ...
   // used for display. This can be used for
   // String, CIMName, CIMNamespaceName, Exception, CIMDateTime, CIMObjectPath
   // The same general class exists in several places in OpenPegasus.
   // TODO: make this a general part of Pegasus so it is not duplicated in
   // many different files.
   class Str
   {
   public:
       Str(const String& s) : _cstr(s.getCString()) { }
       Str(const CIMName& n) : _cstr(n.getString().getCString()) { }
       Str(const CIMNamespaceName& n) : _cstr(n.getString().getCString()) { }
       Str(const Exception& e) : _cstr(e.getMessage().getCString()) { }
       Str(const CIMDateTime& x) : _cstr(x.toString().getCString()) { }
       Str(const CIMObjectPath& x) : _cstr(x.toString().getCString()) { }
       const char* operator*() const { return (const char*)_cstr; }
       operator const char*() const { return (const char*)_cstr; }
   private:
       CString _cstr;
   };
   
 // defines conversion between sec and usec // defines conversion between sec and usec
 #define PEG_MICROSEC 1000000 #define PEG_MICROSEC 1000000
  
Line 100 
Line 122 
     PEG_TRACE((TRC_ENUMCONTEXT, Tracer::LEVEL3,     PEG_TRACE((TRC_ENUMCONTEXT, Tracer::LEVEL3,
         "Create EnumerationContext ContextId=%s operationTimeoutSec %u"         "Create EnumerationContext ContextId=%s operationTimeoutSec %u"
         " responseCacheDataType %u StartTime %lu",         " responseCacheDataType %u StartTime %lu",
         (const char *)getContextId().getCString(),          *Str(getContextId()),
         _operationTimeoutSec,         _operationTimeoutSec,
         _responseCache.getResponseDataContent(),         _responseCache.getResponseDataContent(),
         (unsigned long int)_startTimeUsec));         (unsigned long int)_startTimeUsec));
Line 156 
Line 178 
         "StartTimer, ContextId=%s, This timeoutTime(sec)=%llu"         "StartTimer, ContextId=%s, This timeoutTime(sec)=%llu"
            " OperationTimeout=%u sec,"            " OperationTimeout=%u sec,"
            " next timeout in %ld sec,",            " next timeout in %ld sec,",
        (const char*)getContextId().getCString(),         *Str(getContextId()),
        (timeoutUsec / PEG_MICROSEC),        (timeoutUsec / PEG_MICROSEC),
        _operationTimeoutSec,        _operationTimeoutSec,
        (long signed int)(_operationTimerUsec - currentTime)/PEG_MICROSEC ));        (long signed int)(_operationTimerUsec - currentTime)/PEG_MICROSEC ));
Line 175 
Line 197 
         "StopTimer ContextId=%s,"         "StopTimer ContextId=%s,"
            " OperationTimeout=%u sec,"            " OperationTimeout=%u sec,"
            " (timerTime - curtime)=%ld sec,",            " (timerTime - curtime)=%ld sec,",
        (const char*)getContextId().getCString(),         *Str(getContextId()), _operationTimeoutSec,
        _operationTimeoutSec,  
        (long signed int)(_operationTimerUsec -        (long signed int)(_operationTimerUsec -
            System::getCurrentTimeUsec())/PEG_MICROSEC ));            System::getCurrentTimeUsec())/PEG_MICROSEC ));
 #endif #endif
Line 205 
Line 226 
     PEG_TRACE((TRC_ENUMCONTEXT, Tracer::LEVEL4,     PEG_TRACE((TRC_ENUMCONTEXT, Tracer::LEVEL4,
         "isTimedOut Timer. ContextId=%s timer(sec)=%lu"         "isTimedOut Timer. ContextId=%s timer(sec)=%lu"
            " current(sec)=%lu time to timeout(usec)=%ld isTimedOut=%s",            " current(sec)=%lu time to timeout(usec)=%ld isTimedOut=%s",
         (const char*)_contextId.getCString(),          *Str(getContextId()),
         (long unsigned int)(_operationTimerUsec / PEG_MICROSEC),         (long unsigned int)(_operationTimerUsec / PEG_MICROSEC),
         (long unsigned int)(currentTime / PEG_MICROSEC),         (long unsigned int)(currentTime / PEG_MICROSEC),
         (long signed int)((_operationTimerUsec - currentTime)),         (long signed int)((_operationTimerUsec - currentTime)),
Line 263 
Line 284 
         "maxWaitTimeUsec=%llu "         "maxWaitTimeUsec=%llu "
         "RequestedResponseObjectCount=%u "         "RequestedResponseObjectCount=%u "
         "totalZeroLenObjectResponseCounter=%u",         "totalZeroLenObjectResponseCounter=%u",
         (const char *)_contextId.getCString(),          *Str(getContextId()),
         _operationTimeoutSec,         _operationTimeoutSec,
         (long unsigned int)_operationTimerUsec,         (long unsigned int)_operationTimerUsec,
         boolToString(_continueOnError),         boolToString(_continueOnError),
Line 338 
Line 359 
     PEG_TRACE((TRC_ENUMCONTEXT, Tracer::LEVEL4,     PEG_TRACE((TRC_ENUMCONTEXT, Tracer::LEVEL4,
         "putCache, ContextId=%s isComplete=%s ResponseDataType=%u "         "putCache, ContextId=%s isComplete=%s ResponseDataType=%u "
             " cacheSize=%u putSize=%u clientClosed=%s",             " cacheSize=%u putSize=%u clientClosed=%s",
         (const char*)getContextId().getCString(),          *Str(getContextId()),
         boolToString(providersComplete),         boolToString(providersComplete),
         _responseCache.getResponseDataContent(),         _responseCache.getResponseDataContent(),
         _responseCache.size(), from.size(),         _responseCache.size(), from.size(),
Line 401 
Line 422 
 #ifdef ENUMERATION_CONTEXT_DIAGNOSTIC_TRACE #ifdef ENUMERATION_CONTEXT_DIAGNOSTIC_TRACE
     PEG_TRACE((TRC_ENUMCONTEXT, Tracer::LEVEL4,     PEG_TRACE((TRC_ENUMCONTEXT, Tracer::LEVEL4,
         "waitCacheSize  ContextId=%s Wait=%lu usec",         "waitCacheSize  ContextId=%s Wait=%lu usec",
        (const char *)_contextId.getCString(),         *Str(getContextId()), (unsigned long int)interval ));
        (unsigned long int)interval ));  
 #endif #endif
  
     _totalWaitTimeUsec += interval;     _totalWaitTimeUsec += interval;
Line 465 
Line 485 
 #ifdef ENUMERATION_CONTEXT_DIAGNOSTIC_TRACE #ifdef ENUMERATION_CONTEXT_DIAGNOSTIC_TRACE
     PEG_TRACE((TRC_ENUMCONTEXT, Tracer::LEVEL4,     PEG_TRACE((TRC_ENUMCONTEXT, Tracer::LEVEL4,
        "testCacheForResponse returns %s for ContextId=%s",        "testCacheForResponse returns %s for ContextId=%s",
                boolToString(rtn), (const char*)getContextId().getCString() ));                 boolToString(rtn), *Str(getContextId()) ));
 #endif #endif
     return rtn;     return rtn;
 } }
Line 523 
Line 543 
 #ifdef ENUMERATION_CONTEXT_DIAGNOSTIC_TRACE #ifdef ENUMERATION_CONTEXT_DIAGNOSTIC_TRACE
     PEG_TRACE((TRC_ENUMCONTEXT, Tracer::LEVEL4,     PEG_TRACE((TRC_ENUMCONTEXT, Tracer::LEVEL4,
       "EnumerationContext::getCache ContextId=%s moveObjects expected=%u"       "EnumerationContext::getCache ContextId=%s moveObjects expected=%u"
           " actual=%u", (const char *)getContextId().getCString(),            " actual=%u", *Str(getContextId()), count, rtnData.size()));
           count, rtnData.size()));  
 #endif #endif
  
     // Signal the ProviderLimitCondition that the cache size may     // Signal the ProviderLimitCondition that the cache size may
Line 542 
Line 561 
  
     PEGASUS_DEBUG_ASSERT(valid());     PEGASUS_DEBUG_ASSERT(valid());
  
       PEG_TRACE((TRC_ENUMCONTEXT, Tracer::LEVEL4,
         "EnumerationContext::signalProviderWait Condition ContextId=%s"
             " cacheSize=%u", *Str(getContextId()), responseCacheSize() ));
   
     AutoMutex autoMut(_providerWaitConditionMutex);     AutoMutex autoMut(_providerWaitConditionMutex);
  
     _providerWaitCondition.signal();     _providerWaitCondition.signal();
Line 624 
Line 647 
  
 #ifdef ENUMERATION_CONTEXT_DIAGNOSTIC_TRACE #ifdef ENUMERATION_CONTEXT_DIAGNOSTIC_TRACE
     PEG_TRACE((TRC_ENUMCONTEXT, Tracer::LEVEL3,     PEG_TRACE((TRC_ENUMCONTEXT, Tracer::LEVEL3,
         "setClientClosed. ContextId=%s ",          "setClientClosed. ContextId=%s ", *Str(getContextId()) ));
         (const char*)getContextId().getCString() ));  
 #endif #endif
  
     // Clear any existing responses out of the cache.  The will never     // Clear any existing responses out of the cache.  The will never
Line 660 
Line 682 
 #ifdef ENUMERATION_CONTEXT_DIAGNOSTIC_TRACE #ifdef ENUMERATION_CONTEXT_DIAGNOSTIC_TRACE
     PEG_TRACE((TRC_ENUMCONTEXT, Tracer::LEVEL4,     PEG_TRACE((TRC_ENUMCONTEXT, Tracer::LEVEL4,
         "setProcessingState. ContextId=%s nextProcessingStat=%s",         "setProcessingState. ContextId=%s nextProcessingStat=%s",
         (const char*)getContextId().getCString(),          *Str(getContextId()), (state? "active" : "inactive") ));
         (state? "active" : "inactive") ));  
 #endif #endif
  
     _processing = state;     _processing = state;


Legend:
Removed from v.1.9  
changed lines
  Added in v.1.10

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2