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

Diff for /pegasus/src/Pegasus/HandlerService/DestinationQueue.cpp between version 1.9 and 1.10

version 1.9, 2012/02/20 07:00:55 version 1.10, 2013/06/11 11:18:31
Line 33 
Line 33 
 #include <Pegasus/Common/Tracer.h> #include <Pegasus/Common/Tracer.h>
 #include <Pegasus/Common/Constants.h> #include <Pegasus/Common/Constants.h>
 #include <Pegasus/Common/StringConversion.h> #include <Pegasus/Common/StringConversion.h>
   #include <Pegasus/Common/MessageQueueService.h>
 #include <Pegasus/Config/ConfigManager.h> #include <Pegasus/Config/ConfigManager.h>
 #include <Pegasus/Provider/CIMOMHandle.h> #include <Pegasus/Provider/CIMOMHandle.h>
 #include "DestinationQueue.h" #include "DestinationQueue.h"
Line 42 
Line 43 
 // Initialize with default values. // Initialize with default values.
 Uint16 DestinationQueue::_maxDeliveryRetryAttempts = 3; Uint16 DestinationQueue::_maxDeliveryRetryAttempts = 3;
 Uint64 DestinationQueue::_minDeliveryRetryIntervalUsec = 20 * 1000000; Uint64 DestinationQueue::_minDeliveryRetryIntervalUsec = 20 * 1000000;
   Uint64 DestinationQueue::_minSubscriptionRemovalTimeIntervalUsec
       = 2592000 * 1000000ULL; // Default 30 days, Refer DSP1054.
 Uint64 DestinationQueue::_sequenceIdentifierLifetimeUsec = 600 * 1000000; Uint64 DestinationQueue::_sequenceIdentifierLifetimeUsec = 600 * 1000000;
   
 String DestinationQueue::_indicationServiceName = "PG:IndicationService"; String DestinationQueue::_indicationServiceName = "PG:IndicationService";
 String DestinationQueue::_objectManagerName = "Pegasus"; String DestinationQueue::_objectManagerName = "Pegasus";
   Uint32 DestinationQueue::_indicationServiceQid;
  
 DestinationQueue::IndDiscardedReasonMsgs DestinationQueue::IndDiscardedReasonMsgs
     DestinationQueue::indDiscardedReasonMsgs[] = {     DestinationQueue::indDiscardedReasonMsgs[] = {
Line 137 
Line 142 
        // See DSP 1054 ver 1.1.0 Sec 7.10        // See DSP 1054 ver 1.1.0 Sec 7.10
     _sequenceIdentifierLifetimeUsec = _maxDeliveryRetryAttempts *     _sequenceIdentifierLifetimeUsec = _maxDeliveryRetryAttempts *
         _minDeliveryRetryIntervalUsec * 10;         _minDeliveryRetryIntervalUsec * 10;
   
       Uint32 subRemoveIntervalValue;
       instance.getProperty(
           instance.findProperty(
               _PROPERTY_SUBSCRIPTIONREMOVALTIMEINTERVAL)).getValue().
                   get(subRemoveIntervalValue);
   
       _minSubscriptionRemovalTimeIntervalUsec =
           subRemoveIntervalValue * 1000000ULL;
   
     PEG_METHOD_EXIT();     PEG_METHOD_EXIT();
 } }
  
Line 172 
Line 187 
                     "Initializaing the Destination Queue");                     "Initializaing the Destination Queue");
                 _initIndicationServiceProperties();                 _initIndicationServiceProperties();
                 _initObjectManagerProperties();                 _initObjectManagerProperties();
                   _indicationServiceQid = MessageQueueService::find_service_qid(
                     PEGASUS_QUEUENAME_INDICATIONSERVICE);
             }             }
             catch(const Exception &e)             catch(const Exception &e)
             {             {
Line 228 
Line 245 
     _retryAttemptsExceededIndications = 0;     _retryAttemptsExceededIndications = 0;
     _subscriptionDeleteDroppedIndications = 0;     _subscriptionDeleteDroppedIndications = 0;
     _calcMaxQueueSize = true;     _calcMaxQueueSize = true;
     _lastSuccessfulDeliveryTimeUsec = 0;  
     _maxIndicationDeliveryQueueSize = 2400;     _maxIndicationDeliveryQueueSize = 2400;
  
       _lastSuccessfulDeliveryTimeUsec =
     _queueCreationTimeUsec = System::getCurrentTimeUsec();     _queueCreationTimeUsec = System::getCurrentTimeUsec();
   
     PEG_METHOD_EXIT();     PEG_METHOD_EXIT();
 } }
  
Line 454 
Line 472 
     _lastDeliveryRetryStatus = FAIL;     _lastDeliveryRetryStatus = FAIL;
     info->deliveryRetryAttemptsMade++;     info->deliveryRetryAttemptsMade++;
  
       // If the last successful delivery time is greater than or equal to
       // SubscriptionRemovalTimeInterval, send message to indication service
       // to reconcile OnFatalErrorPolicy
       if (System::getCurrentTimeUsec() - _lastSuccessfulDeliveryTimeUsec >=
           _minSubscriptionRemovalTimeIntervalUsec)
       {
           CIMProcessIndicationResponseMessage *response =
               new CIMProcessIndicationResponseMessage(
                   XmlWriter::getNextMessageId(),
                   CIMException(CIM_ERR_FAILED),
                   QueueIdStack(_indicationServiceQid),
                   String(),
                   info->subscription);
           response->dest = _indicationServiceQid;
           MessageQueueService::SendForget(response);
       }
   
     // Check for DeliveryRetryAttempts by adding the original delivery attempt.     // Check for DeliveryRetryAttempts by adding the original delivery attempt.
     if (info->deliveryRetryAttemptsMade >= _maxDeliveryRetryAttempts + 1)     if (info->deliveryRetryAttemptsMade >= _maxDeliveryRetryAttempts + 1)
     {     {
Line 720 
Line 755 
     qinfo.retryAttemptsExceededIndications = _retryAttemptsExceededIndications;     qinfo.retryAttemptsExceededIndications = _retryAttemptsExceededIndications;
     qinfo.subscriptionDisableDroppedIndications =     qinfo.subscriptionDisableDroppedIndications =
         _subscriptionDeleteDroppedIndications;         _subscriptionDeleteDroppedIndications;
     qinfo.lastSuccessfulDeliveryTimeUsec = _lastSuccessfulDeliveryTimeUsec;      /* If the last successful delivery time is equals to the queue creation
        * time, indication delivery for this destination was never successful
        */
       qinfo.lastSuccessfulDeliveryTimeUsec =
         _lastSuccessfulDeliveryTimeUsec == _queueCreationTimeUsec ? 0 :
             _lastSuccessfulDeliveryTimeUsec;
 } }
  
 PEGASUS_NAMESPACE_END PEGASUS_NAMESPACE_END


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