1 venkat.puvvada 1.1 //%LICENSE////////////////////////////////////////////////////////////////
2 //
3 // Licensed to The Open Group (TOG) under one or more contributor license
4 // agreements. Refer to the OpenPegasusNOTICE.txt file distributed with
5 // this work for additional information regarding copyright ownership.
6 // Each contributor licenses this file to you under the OpenPegasus Open
7 // Source License; you may not use this file except in compliance with the
8 // License.
9 //
10 // Permission is hereby granted, free of charge, to any person obtaining a
11 // copy of this software and associated documentation files (the "Software"),
12 // to deal in the Software without restriction, including without limitation
13 // the rights to use, copy, modify, merge, publish, distribute, sublicense,
14 // and/or sell copies of the Software, and to permit persons to whom the
15 // Software is furnished to do so, subject to the following conditions:
16 //
17 // The above copyright notice and this permission notice shall be included
18 // in all copies or substantial portions of the Software.
19 //
20 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
21 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
22 venkat.puvvada 1.1 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
23 // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
24 // CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
25 // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
26 // SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27 //
28 //////////////////////////////////////////////////////////////////////////
29 //
30 //%/////////////////////////////////////////////////////////////////////////////
31
32 #include <Pegasus/Common/Time.h>
33 #include <Pegasus/Common/Tracer.h>
34 #include <Pegasus/Common/Constants.h>
35 #include <Pegasus/Common/StringConversion.h>
36 #include <Pegasus/Config/ConfigManager.h>
37 #include <Pegasus/Provider/CIMOMHandle.h>
38 #include "DestinationQueue.h"
39
40 PEGASUS_NAMESPACE_BEGIN
41
42 // Initialize with default values.
43 venkat.puvvada 1.1 Uint16 DestinationQueue::_maxDeliveryRetryAttempts = 3;
44 Uint64 DestinationQueue::_minDeliveryRetryIntervalUsec = 20 * 1000000;
45 Uint64 DestinationQueue::_sequenceIdentifierLifetimeUsec = 600 * 1000000;
46 String DestinationQueue::_indicationServiceName = "PG:IndicationService";
47 String DestinationQueue::_objectManagerName = "Pegasus";
48
49 const char* DestinationQueue::_indDiscardedReasons[] = {
50 "Listener not active",
51 "Subscription not active",
52 "DestinationQueue full",
53 "SequenceIdentifierLifetTime expired",
54 "DeliveryRetryAttempts exceeded",
55 "CIMServer shutdown"
56 };
57
58 Uint64 DestinationQueue::_serverStartupTimeUsec
59 = System::getCurrentTimeUsec();
60
61 Boolean DestinationQueue::_initialized = false;
62 static Mutex _intializeMutex;
63
64 venkat.puvvada 1.1 CIMInstance DestinationQueue::_getInstance(const CIMName &className)
65 {
66 CIMOMHandle cimomHandle;
67 Array<CIMInstance> instances =
68 cimomHandle.enumerateInstances(
69 OperationContext(),
70 PEGASUS_NAMESPACENAME_INTEROP,
71 className,
72 true,
73 false,
74 false,
75 false,
76 CIMPropertyList());
77
78 return instances[0];
79 }
80
81 void DestinationQueue::_initIndicationServiceProperties()
82 {
83 PEG_METHOD_ENTER(TRC_IND_HANDLER,
84 "DestinationQueue::_initIndicationServiceProperties");
85 venkat.puvvada 1.1
86 CIMInstance instance =
87 _getInstance(PEGASUS_CLASSNAME_CIM_INDICATIONSERVICE);
88
89 instance.getProperty(
90 instance.findProperty(
91 _PROPERTY_DELIVERY_RETRYATTEMPTS)).getValue().get(
92 _maxDeliveryRetryAttempts);
93
94 instance.getProperty(
95 instance.findProperty(
96 PEGASUS_PROPERTYNAME_NAME)).getValue().get(
97 _indicationServiceName);
98
99 CIMValue value = instance.getProperty(
100 instance.findProperty(
101 _PROPERTY_DELIVERY_RETRYINTERVAL)).getValue();
102
103 if (value.getType() == CIMTYPE_UINT32)
104 {
105 Uint32 tval;
106 venkat.puvvada 1.1 value.get(tval);
107 _minDeliveryRetryIntervalUsec = Uint64(tval) * 1000000;
108 }
109 else
110 {
111 value.get(_minDeliveryRetryIntervalUsec);
112 _minDeliveryRetryIntervalUsec*= 1000000;
113 }
114 // See DSP 1054 ver 1.1.0 Sec 7.10
115 _sequenceIdentifierLifetimeUsec = _maxDeliveryRetryAttempts *
116 _minDeliveryRetryIntervalUsec * 10;
117 PEG_METHOD_EXIT();
118 }
119
120 void DestinationQueue::_initObjectManagerProperties()
121 {
122 PEG_METHOD_ENTER(TRC_IND_HANDLER,
123 "DestinationQueue::_initObjectManagerProperties");
124
125 CIMInstance instance =
126 _getInstance(PEGASUS_CLASSNAME_PG_OBJECTMANAGER);
127 venkat.puvvada 1.1
128 instance.getProperty(
129 instance.findProperty(
130 PEGASUS_PROPERTYNAME_NAME)).getValue().get(
131 _objectManagerName);
132 PEG_METHOD_EXIT();
133 }
134
135 DestinationQueue::DestinationQueue(
136 const CIMInstance &handler):_handler(handler)
137 {
138 PEG_METHOD_ENTER(TRC_IND_HANDLER,
139 "DestinationQueue::DestinationQueue");
140
141 if (!_initialized)
142 {
143 AutoMutex mtx(_intializeMutex);
144 if (!_initialized)
145 {
146 try
147 {
148 venkat.puvvada 1.1 PEG_TRACE_CSTRING(TRC_IND_HANDLER, Tracer::LEVEL4,
149 "Initializaing the Destination Queue");
150 _initIndicationServiceProperties();
151 _initObjectManagerProperties();
152 }
153 catch(const Exception &e)
154 {
155 PEG_TRACE((TRC_IND_HANDLER,Tracer::LEVEL1,
156 "Exception %s caught while initializing the "
157 "DestinationQueue, using default values.",
158 (const char*)e.getMessage().getCString()));
159 }
160 catch(...)
161 {
162 PEG_TRACE_CSTRING(TRC_IND_HANDLER,Tracer::LEVEL1,
163 "Unknown exception caught while initializing the "
164 "DestinationQueue, using default values.");
165 }
166 _initialized = true;
167 }
168 }
169 venkat.puvvada 1.1
170 // Build the sequence context
171 _sequenceContext = _indicationServiceName;
172 _sequenceContext.append("-");
173 _sequenceContext.append(_objectManagerName);
174 _sequenceContext.append("-");
175
176 Uint32 len = 0;
177 char buffer[22];
178 const char* ptr = Uint64ToString(buffer, _serverStartupTimeUsec,len);
179 _sequenceContext.append(String(ptr, len));
180 _sequenceContext.append("-");
181
182 Uint32 idx = handler.findProperty(
183 PEGASUS_PROPERTYNAME_LSTNRDST_CREATIONTIME);
184
185 if (idx != PEG_NOT_FOUND)
186 {
187 Uint64 tvalue;
188 handler.getProperty(idx).getValue().get(tvalue);
189 Uint32 llen = 0;
190 venkat.puvvada 1.1 char lbuffer[22];
191 const char* lptr = Uint64ToString(lbuffer, tvalue, llen);
192 _sequenceContext.append(String(lptr, llen));
193 }
194 else
195 {
196 _sequenceContext.append(String(ptr, len));
197 }
198 _lastDeliveryRetryStatus = FAIL;
199
200 _sequenceNumber = 0;
201 _queueFullDroppedIndications = 0;
202 _lifetimeExpiredIndications = 0;
203 _retryAttemptsExceededIndications = 0;
204 _subscriptionDeleteDroppedIndications = 0;
205 _calcMaxQueueSize = true;
206 _lastSuccessfulDeliveryTimeUsec = 0;
207 _maxIndicationDeliveryQueueSize = 2400;
208
209 _queueCreationTimeUsec = System::getCurrentTimeUsec();
210 PEG_METHOD_EXIT();
211 venkat.puvvada 1.1 }
212
213 DestinationQueue::~DestinationQueue()
214 {
215 PEG_METHOD_ENTER(TRC_IND_HANDLER,
216 "DestinationQueue::~DestinationQueue");
217
|
218 marek 1.2 if (_queue.size() || _lastDeliveryRetryStatus == PENDING)
|
219 venkat.puvvada 1.1 {
220 _cleanup(LISTENER_NOT_ACTIVE);
221 }
222
223 PEG_METHOD_EXIT();
224 }
225
226 Sint64 DestinationQueue::getSequenceNumber()
227 {
228 AutoMutex mtx(_queueMutex);
229
230 // Determine max queue size, See PEP 324 for the algorithm
231 if (_calcMaxQueueSize)
232 {
233 if ((System::getCurrentTimeUsec() - _queueCreationTimeUsec)
234 >= _sequenceIdentifierLifetimeUsec)
235 {
236 // (10 * DeliveryRetryInterval * DeliveryRetryAttempts) /
237 // (Number of indications arrived over
238 // sequence-identifier-lifetime.)
239
240 venkat.puvvada 1.1 _maxIndicationDeliveryQueueSize = _sequenceNumber;
241
242 if (_maxIndicationDeliveryQueueSize < 200)
243 {
244 _maxIndicationDeliveryQueueSize = 200;
245 }
246 else if (_maxIndicationDeliveryQueueSize > 2400)
247 {
248 _maxIndicationDeliveryQueueSize = 2400;
249 }
250 _calcMaxQueueSize = false;
251 }
252 }
253
254 Sint64 nextSequenceNumber = _sequenceNumber++;
255
256 if (_sequenceNumber < 0)
257 {
258 _sequenceNumber = 0;
259 }
260
261 venkat.puvvada 1.1 return nextSequenceNumber;
262 }
263
264 String DestinationQueue::_getSequenceContext(
265 const CIMInstance &indication)
266 {
267 String sequenceContext;
268
269 indication.getProperty(
270 indication.findProperty(
271 _PROPERTY_SEQUENCECONTEXT)).getValue().get(sequenceContext);
272
273 return sequenceContext;
274 }
275
276 Sint64 DestinationQueue::_getSequenceNumber(
277 const CIMInstance &indication)
278 {
279 Sint64 sequenceNumber;
280
281 indication.getProperty(
282 venkat.puvvada 1.1 indication.findProperty(
283 _PROPERTY_SEQUENCENUMBER)).getValue().get(sequenceNumber);
284
285 return sequenceNumber;
286 }
287
|
288 venkat.puvvada 1.4 void DestinationQueue::_logDiscardedIndication(
289 Uint32 reasonCode,
290 const CIMInstance &indication,
291 const String &message)
|
292 venkat.puvvada 1.1 {
293
294 PEGASUS_ASSERT(reasonCode <
295 sizeof(_indDiscardedReasons)/sizeof(const char*));
296
|
297 venkat.puvvada 1.4 String logMessage = _indDiscardedReasons[reasonCode];
298 logMessage.append(Char16('.'));
299 logMessage.append(message);
300 Logger::put_l(Logger::ERROR_LOG, System::CIMSERVER, Logger::WARNING,
301 MessageLoaderParms(
302 "HandlerService.DestinationQueue.INDICATION_DELIVERY_FAILED",
303 "Failed to deliver an indication with SequenceContext \"$0\" "
304 "and SequenceNumber \"$1\" : $2.",
305 (const char*)_getSequenceContext(indication).getCString(),
306 _getSequenceNumber(indication),
307 (const char*)logMessage.getCString()));
|
308 venkat.puvvada 1.1 }
309
|
310 marek 1.2 void DestinationQueue::enqueue(CIMHandleIndicationRequestMessage *message)
|
311 venkat.puvvada 1.1 {
312 PEG_METHOD_ENTER(TRC_IND_HANDLER,
313 "DestinationQueue::enqueue");
314
|
315 marek 1.2 Uint32 idx;
316 CIMProperty prop;
317 CIMInstance &indication = message->indicationInstance;
318
319 if ((idx = indication.findProperty(_PROPERTY_SEQUENCECONTEXT))
320 != PEG_NOT_FOUND)
321 {
322 prop = indication.getProperty(idx);
323 prop.setValue(getSequenceContext());
324 indication.removeProperty(idx);
325 }
326 else
327 {
328 prop = CIMProperty(
329 _PROPERTY_SEQUENCECONTEXT,
330 getSequenceContext());
331 }
332 indication.addProperty(prop);
333
|
334 venkat.puvvada 1.1 AutoMutex mtx(_queueMutex);
|
335 marek 1.2 Sint64 sequenceNumber = getSequenceNumber();
336 if ((idx = indication.findProperty(_PROPERTY_SEQUENCENUMBER))
337 != PEG_NOT_FOUND)
338 {
339 prop = indication.getProperty(idx);
340 prop.setValue(sequenceNumber);
341 indication.removeProperty(idx);
342 }
343 else
344 {
345 prop = CIMProperty(
346 _PROPERTY_SEQUENCENUMBER,
347 sequenceNumber);
348 }
349 indication.addProperty(prop);
350
351 IndicationInfo *info = new IndicationInfo(
352 message->indicationInstance,
353 message->subscriptionInstance,
354 message->operationContext,
355 message->nameSpace.getString(),
356 marek 1.2 this);
|
357 venkat.puvvada 1.1 _queue.insert_back(info);
358
|
359 marek 1.2 info->lastDeliveryRetryTimeUsec = 0;
360 info->arrivalTimeUsec = System::getCurrentTimeUsec();
|
361 venkat.puvvada 1.1
362 if (_queue.size() > _maxIndicationDeliveryQueueSize)
363 {
364 _queueFullDroppedIndications++;
365 IndicationInfo *temp = _queue.remove_front();
|
366 venkat.puvvada 1.4 _logDiscardedIndication(
|
367 venkat.puvvada 1.1 DESTINATIONQUEUE_FULL,
368 temp->indication);
369 delete temp;
370 }
|
371 marek 1.2
|
372 venkat.puvvada 1.1 PEG_METHOD_EXIT();
373 }
374
375 void DestinationQueue::updateDeliveryRetrySuccess(IndicationInfo *info)
376 {
377 PEG_METHOD_ENTER(TRC_IND_HANDLER,
378 "DestinationQueue::updateDeliveryRetrySuccess");
379
380 AutoMutex mtx(_queueMutex);
381 PEGASUS_ASSERT(_lastDeliveryRetryStatus == PENDING);
382 _lastSuccessfulDeliveryTimeUsec = System::getCurrentTimeUsec();
383 _lastDeliveryRetryStatus = SUCCESS;
384
385 PEG_TRACE((TRC_IND_HANDLER, Tracer::LEVEL4,
386 "Indication with SequenceContext %s and SequenceNumber %"
387 PEGASUS_64BIT_CONVERSION_WIDTH "d is successfully delivered",
388 (const char*)_getSequenceContext(info->indication).getCString(),
389 _getSequenceNumber(info->indication)));
390
391 delete info;
392
393 venkat.puvvada 1.1 PEG_METHOD_EXIT();
394 }
395
396 void DestinationQueue::updateDeliveryRetryFailure(
397 IndicationInfo *info,
398 const CIMException &e)
399 {
400 PEG_METHOD_ENTER(TRC_IND_HANDLER,
401 "DestinationQueue::updateDeliveryRetryFailure");
402
403 AutoMutex mtx(_queueMutex);
404
405 PEGASUS_ASSERT(_lastDeliveryRetryStatus == PENDING);
406 _lastDeliveryRetryStatus = FAIL;
407 info->deliveryRetryAttemptsMade++;
408
|
409 marek 1.2 // Check for DeliveryRetryAttempts by adding the original delivery attempt.
410 if (info->deliveryRetryAttemptsMade >= _maxDeliveryRetryAttempts + 1)
|
411 venkat.puvvada 1.1 {
412 _retryAttemptsExceededIndications++;
|
413 venkat.puvvada 1.4 _logDiscardedIndication(
|
414 venkat.puvvada 1.1 DRA_EXCEEDED,
|
415 venkat.puvvada 1.4 info->indication,
416 e.getMessage());
|
417 venkat.puvvada 1.1 delete info;
418 }
|
419 marek 1.2 else if (_queue.size() >= _maxIndicationDeliveryQueueSize)
|
420 venkat.puvvada 1.1 {
421 _queueFullDroppedIndications++;
|
422 venkat.puvvada 1.4 _logDiscardedIndication(
|
423 venkat.puvvada 1.1 DESTINATIONQUEUE_FULL,
424 info->indication);
425 delete info;
426 }
427 else
428 {
|
429 marek 1.2 // To deliver the indications in the correct order, insert the
430 // delivery retry failed indications at the front of the queue.
431 _queue.insert_front(info);
|
432 venkat.puvvada 1.4 PEG_TRACE((TRC_IND_HANDLER,Tracer::LEVEL1,
433 "Delivery failure for indication with SequenceContext %s and "
434 "SequenceNumber %" PEGASUS_64BIT_CONVERSION_WIDTH "d."
435 " DeliveryRetryAttempts made %u. Exception : %s",
436 (const char*)_getSequenceContext(info->indication).getCString(),
437 _getSequenceNumber(info->indication),
438 info->deliveryRetryAttemptsMade,
439 (const char*)e.getMessage().getCString()));
|
440 venkat.puvvada 1.1 info->lastDeliveryRetryTimeUsec = System::getCurrentTimeUsec();
441 }
442
443 PEG_METHOD_EXIT();
444 }
445
446 void DestinationQueue::_waitForNonPendingDeliveryStatus()
447 {
448 PEG_METHOD_ENTER(TRC_IND_HANDLER,
449 "DestinationQueue::_waitForNonPendingDeliveryStatus");
450
451 while (true)
452 {
453 {
454 AutoMutex mtx(_queueMutex);
455 if (_lastDeliveryRetryStatus != PENDING)
456 {
457 break;
458 }
459 }
460 Threads::yield();
461 venkat.puvvada 1.1 Threads::sleep(50);
462 }
463 PEG_METHOD_EXIT();
464 }
465
466 void DestinationQueue::deleteMatchedIndications(
467 const CIMObjectPath &subscriptionPath)
468 {
469 PEG_METHOD_ENTER(TRC_IND_HANDLER,
470 "DestinationQueue::deleteMatchedIndications");
471
472 _waitForNonPendingDeliveryStatus();
473
474 IndicationInfo *info;
475 AutoMutex mtx(_queueMutex);
476
477 for(Uint32 i = 0, n = _queue.size(); i < n; ++i)
478 {
479 info = _queue.remove_front();
480 if (info->subscription.getPath().identical(subscriptionPath))
481 {
482 venkat.puvvada 1.1 _subscriptionDeleteDroppedIndications++;
|
483 venkat.puvvada 1.4 _logDiscardedIndication(
|
484 venkat.puvvada 1.1 SUBSCRIPTION_NOT_ACTIVE,
485 info->indication);
486 delete info;
487 }
488 else
489 {
490 _queue.insert_back(info);
491 }
492 }
493 PEG_METHOD_EXIT();
494 }
495
496 void DestinationQueue::cleanup()
497 {
498 PEG_METHOD_ENTER(TRC_IND_HANDLER,
499 "DestinationQueue::cleanup");
500
501 _cleanup(LISTENER_NOT_ACTIVE);
502
503 PEG_METHOD_EXIT();
504 }
505 venkat.puvvada 1.1
506 void DestinationQueue::shutdown()
507 {
508 PEG_METHOD_ENTER(TRC_IND_HANDLER,
509 "DestinationQueue::shutdown");
510
511 _cleanup(CIMSERVER_SHUTDOWN);
512
513 PEG_METHOD_EXIT();
514 }
515
516 void DestinationQueue::_cleanup(int reasonCode)
517 {
518 _waitForNonPendingDeliveryStatus();
519
520 IndicationInfo *info;
521 while ((info = _queue.remove_front()))
522 {
|
523 venkat.puvvada 1.4 _logDiscardedIndication(
|
524 venkat.puvvada 1.1 reasonCode,
525 info->indication);
526 delete info;
527 }
528 }
529
530 IndicationInfo* DestinationQueue::getNextIndicationForDelivery(
531 Uint64 &timeNowUsec, Uint64 &nextIndDRIExpTimeUsec)
532 {
533 AutoMutex mtx(_queueMutex);
534
535 if (!_queue.size() || _lastDeliveryRetryStatus == PENDING)
536 {
|
537 venkat.puvvada 1.3 // Maximum expiration time is equals to DeliveryRetryInterval.
538 nextIndDRIExpTimeUsec = _minDeliveryRetryIntervalUsec;
|
539 venkat.puvvada 1.1 return 0;
540 }
541
|
542 venkat.puvvada 1.3 nextIndDRIExpTimeUsec = 0;
543
|
544 venkat.puvvada 1.1 IndicationInfo *info;
545
546 while (_queue.size())
547 {
548 info = _queue.front();
549
550 if (timeNowUsec < info->arrivalTimeUsec ||
551 timeNowUsec < info->lastDeliveryRetryTimeUsec)
552 {
553 timeNowUsec = System::getCurrentTimeUsec();
554 }
555
556 if ((timeNowUsec - info->arrivalTimeUsec) >=
557 _sequenceIdentifierLifetimeUsec)
558 {
559 _lifetimeExpiredIndications++;
560 IndicationInfo *temp = _queue.remove_front();
|
561 venkat.puvvada 1.4 _logDiscardedIndication(
|
562 venkat.puvvada 1.1 SIL_EXPIRED,
563 temp->indication);
564 delete temp;
565 }
566 else if ((timeNowUsec - info->lastDeliveryRetryTimeUsec)
567 >= _minDeliveryRetryIntervalUsec)
568 {
569 _lastDeliveryRetryStatus = PENDING;
570 _queue.remove_front();
571 IndicationInfo *temp = _queue.front();
572
|
573 marek 1.2 // The following algorithm is used to determine the elapsed
574 // DeliveryRetryAttempts. To deliver the indication in order,
575 // Server delays the newer indications until older indications
576 // in the queue are attempted for delivery and their
577 // DeliveryRetyAttempts are exceeded. The following algorithm
578 // ensures that indications won't stay in the queue more than
579 // (DeliveryRetryInterval * (DeliveryRetyAttempts + 1) time.
580 Uint32 elapsedDeliveryRetryAttempts;
581 if (info->lastDeliveryRetryTimeUsec)
582 {
583 elapsedDeliveryRetryAttempts =
584 ((timeNowUsec - info->lastDeliveryRetryTimeUsec)
585 / _minDeliveryRetryIntervalUsec);
586 }
587 else
588 {
589 elapsedDeliveryRetryAttempts =
590 ((timeNowUsec - info->arrivalTimeUsec)
591 / _minDeliveryRetryIntervalUsec);
592 }
593
594 marek 1.2 if (elapsedDeliveryRetryAttempts)
595 {
596 info->deliveryRetryAttemptsMade +=
597 elapsedDeliveryRetryAttempts - 1;
598 }
599
|
600 venkat.puvvada 1.1 if (temp)
601 {
602 if (timeNowUsec - temp->lastDeliveryRetryTimeUsec
603 < _minDeliveryRetryIntervalUsec)
604 {
605 nextIndDRIExpTimeUsec = _minDeliveryRetryIntervalUsec -
606 (timeNowUsec - temp->lastDeliveryRetryTimeUsec);
607 }
608
609 PEGASUS_ASSERT(nextIndDRIExpTimeUsec
610 <= _minDeliveryRetryIntervalUsec);
611 }
612
613 return info;
614 }
615 else
616 {
617 if (timeNowUsec - info->lastDeliveryRetryTimeUsec
618 < _minDeliveryRetryIntervalUsec)
619 {
620 nextIndDRIExpTimeUsec = _minDeliveryRetryIntervalUsec -
621 venkat.puvvada 1.1 (timeNowUsec - info->lastDeliveryRetryTimeUsec);
622 }
623
624 PEGASUS_ASSERT(nextIndDRIExpTimeUsec
625 <= _minDeliveryRetryIntervalUsec);
626
627 break;
628 }
629 }
630
631 return 0;
632 }
633
634 void DestinationQueue::getInfo(QueueInfo &qinfo)
635 {
636 AutoMutex mtx(_queueMutex);
637
638 qinfo.handlerName = _handler.getPath();
639 qinfo.queueCreationTimeUsec = _queueCreationTimeUsec;
640 qinfo.sequenceContext = _sequenceContext;
641 qinfo.nextSequenceNumber = _sequenceNumber;
642 venkat.puvvada 1.1 qinfo.maxQueueLength = _maxIndicationDeliveryQueueSize;
643 qinfo.sequenceIdentifierLifetimeSeconds =
644 _sequenceIdentifierLifetimeUsec / 1000000;
645 qinfo.size = _queue.size();
646 qinfo.queueFullDroppedIndications = _queueFullDroppedIndications;
647 qinfo.lifetimeExpiredIndications = _lifetimeExpiredIndications;
648 qinfo.retryAttemptsExceededIndications = _retryAttemptsExceededIndications;
649 qinfo.subscriptionDisableDroppedIndications =
650 _subscriptionDeleteDroppedIndications;
651 qinfo.lastSuccessfulDeliveryTimeUsec = _lastSuccessfulDeliveryTimeUsec;
652 }
653
654 PEGASUS_NAMESPACE_END
655
|