1 karl 1.13 //%2006////////////////////////////////////////////////////////////////////////
|
2 kumpf 1.1 //
|
3 karl 1.4 // Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development
4 // Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems.
5 // Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L.P.;
|
6 kumpf 1.1 // IBM Corp.; EMC Corporation, The Open Group.
|
7 karl 1.4 // Copyright (c) 2004 BMC Software; Hewlett-Packard Development Company, L.P.;
8 // IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group.
|
9 karl 1.5 // Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.;
10 // EMC Corporation; VERITAS Software Corporation; The Open Group.
|
11 karl 1.13 // Copyright (c) 2006 Hewlett-Packard Development Company, L.P.; IBM Corp.;
12 // EMC Corporation; Symantec Corporation; The Open Group.
|
13 kumpf 1.1 //
14 // Permission is hereby granted, free of charge, to any person obtaining a copy
15 // of this software and associated documentation files (the "Software"), to
16 // deal in the Software without restriction, including without limitation the
17 // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
18 // sell copies of the Software, and to permit persons to whom the Software is
19 // furnished to do so, subject to the following conditions:
|
20 r.kieninger 1.16 //
|
21 kumpf 1.1 // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
22 // ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED
23 // "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
24 // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
25 // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
26 // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
27 // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
28 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
29 //
30 //==============================================================================
31 //
32 // Author: Carol Ann Krug Graves, Hewlett-Packard Company
33 // (carolann_graves@hp.com)
34 //
|
35 aruran.ms 1.12 // Modified By: Aruran, IBM (ashanmug@in.ibm.com) for Bug# 3603, 3602
|
36 kumpf 1.1 //
37 //%/////////////////////////////////////////////////////////////////////////////
38
39 #ifndef Pegasus_SubscriptionTable_h
40 #define Pegasus_SubscriptionTable_h
41
42 #include <Pegasus/Common/Config.h>
43 #include <Pegasus/Server/Linkage.h>
44 #include <Pegasus/Common/CIMInstance.h>
45 #include <Pegasus/Common/CIMObjectPath.h>
46 #include <Pegasus/Common/String.h>
47 #include <Pegasus/Common/Array.h>
48 #include <Pegasus/Common/HashTable.h>
49
50 #include "ProviderClassList.h"
51 #include "SubscriptionRepository.h"
52
53 PEGASUS_NAMESPACE_BEGIN
54
55 class IndicationService;
56
57 kumpf 1.1 /**
58 Entry for ActiveSubscriptions table
59 */
60 struct ActiveSubscriptionsTableEntry
61 {
62 CIMInstance subscription;
63 Array <ProviderClassList> providers;
64 };
65
66 /**
67 Table for active subscription information
68
69 The ActiveSubscriptions table is used to keep track of active subscriptions.
|
70 carolann.graves 1.10 This table contains an entry for each subscription that is enabled
71 (value of SubscriptionState property is enabled).
72 Each entry consists of a Subscription instance, and a list of
73 ProviderClassList structs representing the providers, if any, currently
74 serving each subscription and the relevant indication subclasses served by
|
75 kumpf 1.1 each provider.
|
76 r.kieninger 1.16 The Key is a string constructed from the elements of a subscriptions
77 object path: <filterInstanceName><handlerInstanceName>/namespace/classname
|
78 carolann.graves 1.10 Entries are inserted into the table on initialization, when an enabled
79 subscription instance is created, or when a subscription instance is
|
80 kumpf 1.1 modified to be enabled.
81 Entries are removed from the table when an enabled subscription instance is
82 deleted, or when a subscription instance is modified to be disabled.
|
83 carolann.graves 1.10 Entries are updated (remove followed by insert) when a provider serving a
84 subscription is disabled or enabled, or a provider registration change
|
85 kumpf 1.1 occurs.
|
86 carolann.graves 1.10 The _handleProcessIndicationRequest() function, when a list of
87 subscriptions is included in request, looks up each subscription in the
|
88 kumpf 1.1 table.
89 The _handleNotifyProviderRegistrationRequest() function, once matching
|
90 carolann.graves 1.10 subscriptions have been identified, looks up the provider information for
|
91 kumpf 1.1 each matching subscription in the table.
|
92 carolann.graves 1.10 The _handleModifyInstanceRequest() and _handleDeleteInstanceRequest()
|
93 kumpf 1.1 functions, when sending delete requests to providers, look up the providers
94 for the subscription in the table.
|
95 carolann.graves 1.10 The _handleNotifyProviderTerminationRequest() function, when a provider is
96 disabled, iterates through the table to retrieve all active
|
97 kumpf 1.1 subscriptions being served by the provider.
|
98 carolann.graves 1.10 The terminate() function, when the CIM Server is being shut down, iterates
|
99 kumpf 1.1 through the table to retrieve all active subscriptions.
100 */
|
101 r.kieninger 1.16 typedef HashTable <String,
|
102 carolann.graves 1.10 ActiveSubscriptionsTableEntry,
|
103 r.kieninger 1.16 EqualFunc <String>,
104 HashFunc <String> > ActiveSubscriptionsTable;
|
105 kumpf 1.1
106 /**
107 Entry for SubscriptionClasses table
108 */
109 struct SubscriptionClassesTableEntry
110 {
111 CIMName indicationClassName;
112 CIMNamespaceName sourceNamespaceName;
113 Array <CIMInstance> subscriptions;
114 };
115
116 /**
117 Table for subscription classes information
118
|
119 carolann.graves 1.10 The SubscriptionClasses Table is used to keep track of active subscriptions
|
120 kumpf 1.1 for each indication subclass-source namespace pair.
121 Each entry consists of an indication subclass name, a source namespace name,
122 and a list of subscription instances.
123 The Key is generated by concatenating the indication subclass name, and the
124 source namespace name.
|
125 carolann.graves 1.10 The _handleProcessIndicationRequest() function, when no list of
126 subscriptions is included in the request, looks up matching subscriptions
127 in the table, using the class name and namespace name of the indication
|
128 kumpf 1.1 instance.
129 The _handleNotifyProviderRegistrationRequest() function, when an indication
|
130 carolann.graves 1.10 provider registration instance has been created or deleted, looks up
131 matching subscriptions in the table, using the class name and namespace
132 names from the provider registration instance.
|
133 kumpf 1.1 */
134 typedef HashTable <String,
135 SubscriptionClassesTableEntry,
|
136 kumpf 1.2 EqualNoCaseFunc,
137 HashLowerCaseFunc> SubscriptionClassesTable;
|
138 kumpf 1.1
139 /**
140
|
141 carolann.graves 1.10 The SubscriptionTable class manages an in-memory cache of indication
142 subscription information in two hash tables. The Active Subscriptions
|
143 kumpf 1.1 table includes all enabled subscriptions along with the providers currently
|
144 carolann.graves 1.10 serving them. The Subscription Classes table includes the enabled
145 subscription instances for each indication class/namespace pair, based on
|
146 kumpf 1.1 the filter query and sourceNamespace.
147
148 @author Hewlett-Packard Company
149
150 */
151
|
152 carolann.graves 1.10 class PEGASUS_SERVER_LINKAGE SubscriptionTable
|
153 kumpf 1.1 {
154 public:
155
156 /**
157 Constructs a SubscriptionTable instance.
158 */
159 SubscriptionTable (
160 SubscriptionRepository * subscriptionRepository);
161
162 /**
163 Destructs a SubscriptionTable instance.
164 */
165 ~SubscriptionTable ();
166
167 /**
168 Inserts entries (or updates existing entries) for the specified
|
169 carolann.graves 1.10 subscription in the Active Subscriptions and Subscription Classes
|
170 kumpf 1.1 tables.
171
172 @param subscription the subscription instance
173 @param providers the list of providers
174 @param indicationSubclassNames the list of indication subclass names
175 @param sourceNamespaceName the source namespace name
176 */
|
177 carolann.graves 1.6 void insertSubscription (
|
178 kumpf 1.1 const CIMInstance & subscription,
179 const Array <ProviderClassList> & providers,
180 const Array <CIMName> & indicationSubclassNames,
181 const CIMNamespaceName & sourceNamespaceName);
182
183 /**
|
184 carolann.graves 1.10 Updates an entry in the Active Subscriptions table to either add a
|
185 kumpf 1.1 provider to or remove a provider from the list of providers serving the
186 subscription.
187
188 @param subscriptionPath the subscription object path
189 @param provider the provider to be added or removed
|
190 carolann.graves 1.10 @param addProvider indicates if adding or removing
|
191 kumpf 1.1 provider
192 */
|
193 carolann.graves 1.6 void updateProviders (
|
194 kumpf 1.1 const CIMObjectPath & subscriptionPath,
|
195 carolann.graves 1.7 const ProviderClassList & provider,
|
196 kumpf 1.1 Boolean addProvider);
197
198 /**
|
199 carolann.graves 1.10 Updates an entry in the Active Subscriptions table to either add a
|
200 kumpf 1.1 class to or remove a class from the list of indication subclasses served
201 by a provider serving the subscription.
202
203 @param subscriptionPath the subscription object path
204 @param provider the provider
205 @param className the class to be added or removed
206 */
207 void updateClasses (
208 const CIMObjectPath & subscriptionPath,
209 const CIMInstance & provider,
210 const CIMName & className);
211
212 /**
|
213 carolann.graves 1.10 Removes entries (or updates entries) for the specified subscription in
|
214 kumpf 1.1 the Active Subscriptions and Subscription Classes tables.
215
216 @param subscription the subscription instance
217 @param indicationSubclassNames the list of indication subclass names
218 @param sourceNamespaceName the source namespace name
|
219 carolann.graves 1.10 @param providers the list of providers that had been
|
220 kumpf 1.1 serving the subscription
221 */
|
222 carolann.graves 1.6 void removeSubscription (
|
223 kumpf 1.1 const CIMInstance & subscription,
224 const Array <CIMName> & indicationSubclassNames,
225 const CIMNamespaceName & sourceNamespaceName,
226 const Array <ProviderClassList> & providers);
227
228 /**
|
229 carolann.graves 1.10 Retrieves the Active Subscriptions table entry for the specified
230 subscription. If this function returns False, the value of tableValue
|
231 kumpf 1.1 is not changed.
232
|
233 carolann.graves 1.7 @param subscriptionPath the object path of the subscription
|
234 kumpf 1.1 @param tableValue the retrieved table entry
235
236 @return True, if the specified subscription table entry was found;
237 False otherwise
238 */
239 Boolean getSubscriptionEntry (
240 const CIMObjectPath & subscriptionPath,
|
241 aruran.ms 1.8 ActiveSubscriptionsTableEntry & tableValue) const;
|
242 kumpf 1.1
243 /**
244 Retrieves list of enabled subscription instances in the specified
|
245 carolann.graves 1.10 namespaces, where the subscription indication class matches or is a
246 superclass of the supported class. If the checkProvider parameter
247 value is True, a subscription is only included in the list returned if
|
248 kumpf 1.1 the specified provider accepted the subscription. If the checkProvider
249 parameter value is False, the provider parameter is not used (ignored).
250
251 @param supportedClass the supported class
252 @param nameSpaces the list of supported namespaces
253 @param checkProvider indicates whether provider acceptance is
254 checked
255 @param provider the provider (used if checkProvider True)
256
257 @return list of CIMInstance subscriptions
258 */
259 Array <CIMInstance> getMatchingSubscriptions (
260 const CIMName & supportedClass,
261 const Array <CIMNamespaceName> nameSpaces,
262 const Boolean checkProvider = false,
|
263 aruran.ms 1.8 const CIMInstance & provider = CIMInstance ()) const;
|
264 kumpf 1.1
265 /**
266 Retrieves list of enabled subscription instances in all namespaces,
|
267 carolann.graves 1.10 that are served by the specified provider. This function is called
268 when a provider is disabled. In the Active Subscriptions table, the
269 specified provider is removed from the list of providers serving the
270 subscription.
271
272 Note: this method may call the SubscriptionRepository
273 reconcileFatalError() method, which may call the CIMRepository
274 modifyInstance() or deleteInstance() method, while a WriteLock is held
275 on the Active Subscriptions table. The determination of whether the
276 SubscriptionRepository reconcileFatalError() method must be called (and
277 whether the repository must be updated) requires a lookup of the Active
278 Subscriptions table to see if any other providers are serving the
279 subscription. The SubscriptionRepository reconcileFatalError() method
280 does not need to access the repository to determine the subscription
281 policy, but if the policy is Disable or Remove, it does need to call the
282 CIMRepository modifyInstance() or deleteInstance() method. The return
283 value from the SubscriptionRepository reconcileFatalError() method (True
284 if the subscription was successfully disabled or removed) in turn
285 determines whether the entry in the Active Subscriptions table must be
286 updated or removed.
|
287 kumpf 1.1
288 @param provider the provider instance
289
290 @return list of CIMInstance subscriptions
291 */
|
292 carolann.graves 1.14 Array <CIMInstance> reflectProviderDisable (
|
293 aruran.ms 1.9 const CIMInstance & provider);
|
294 kumpf 1.1
295 /**
|
296 carolann.graves 1.14 Retrieves a list of subscription table entries for subscriptions that
297 were being served by providers in the specified provider module, where
298 the subscription creator matches the specified provider module userName.
299 The Active Subscriptions table is updated to reflect the fact that these
300 subscriptions are no longer being served by the provider(s) in the
301 failed provider module.
302 This method is called when notification is received that the specified
303 provider module has failed. In the Active Subscriptions table, any
304 provider in the specified provider module is removed from the list of
305 providers serving the subscription.
306 The returned list of Active Subscriptions table entries includes for
307 each subscription only those providers that are in the specified
308 (failed) provider module and therefore are no longer serving the
309 subscription.
310
311 @param moduleName the provider module name
312 @param userName the user name for the context in which
313 the provider module was invoked
314 @param authenticationEnabled indicates whether authentication is
315 currently enabled
316
317 carolann.graves 1.14 @return list of ActiveSubscriptionsTableEntry structs including the
318 subscriptions served by providers in the specified provider
319 module
320 */
321 Array <ActiveSubscriptionsTableEntry> reflectProviderModuleFailure (
322 const String & moduleName,
323 const String & userName,
324 Boolean authenticationEnabled);
325
326 /**
|
327 carolann.graves 1.10 Determines if the specified provider is in the list of providers
328 serving the subscription.
|
329 kumpf 1.1
330 @param provider the provider instance
331 @param tableValue the Active Subscriptions Table entry
332
333 @return The index of the provider in the list, if found;
334 PEG_NOT_FOUND otherwise
335 */
|
336 carolann.graves 1.10 Uint32 providerInList
|
337 kumpf 1.1 (const CIMInstance & provider,
338 const ActiveSubscriptionsTableEntry & tableValue) const;
339
340 /**
|
341 carolann.graves 1.10 Determines if the specified class is in the list of indication
342 subclasses served by the specified provider, serving the subscription.
|
343 kumpf 1.1
344 @param className the class name
|
345 carolann.graves 1.10 @param providerClasses a provider serving the subscription,
|
346 kumpf 1.1 with the indication classes served
347
348 @return The index of the class name in the list, if found;
349 PEG_NOT_FOUND otherwise
350 */
351 Uint32 classInList
352 (const CIMName & className,
353 const ProviderClassList & providerClasses) const;
354
|
355 kumpf 1.3 /**
|
356 carolann.graves 1.10 Removes all entries from the Active Subscriptions and Subscription
|
357 kumpf 1.3 Classes tables.
358 */
359 void clear ();
360
|
361 yi.zhou 1.17 /**
362 Retrieves list of enabled subscription instances in the specified
363 namespace, where the subscription indication class matches or is a
364 superclass of the supported class. A subscription is only included
365 in the list returned if the specified provider accepted the
366 subscription.
367
368 @param supportedClass The supported class
369 @param nameSpace The specified namespace
370 @param provider The provider instance which accepts
371 subscriptions
|
372 yi.zhou 1.18 @param subscriptions Output Array of subscription instances
373 @param subscriptionKeys Output Array of associated subscription
374 keys
|
375 yi.zhou 1.17 */
|
376 yi.zhou 1.18 void getMatchingClassNamespaceSubscriptions(
|
377 yi.zhou 1.17 const CIMName & supportedClass,
378 const CIMNamespaceName& nameSpace,
|
379 yi.zhou 1.18 const CIMInstance & provider,
380 Array<CIMInstance>& matchingSubscriptions,
381 Array<String>& matchingSubscriptionKeys);
382
383 #ifdef PEGASUS_ENABLE_INDICATION_COUNT
384 /**
385 Updates entries in the Active Subscriptions table to increase
386 matched indication counts for a specified provider which serves the
387 subscriptions.
388
389 @param provider A PG_Provider instance representing the provider that
390 serves the subscriptions.
391 @param subscriptionsKeys The keys of matched subscriptions which
392 are served by the provider.
393 */
394 void updateMatchedIndicationCounts(
395 const CIMInstance& providerInstance,
396 const Array<String>& subscriptionsKeys);
397
398 /**
399 Enumerates PG_SubscriptionIndicationData instances using the data
400 yi.zhou 1.18 stored in the Active Subscriptions table.
401
402 @return All the PG_SubscriptionIndicationData instances.
403 */
404 Array<CIMInstance> enumerateSubscriptionIndicationDataInstances();
|
405 yi.zhou 1.19
406 /**
407 Enumerates PG_SubscriptionIndicationData instance names using the data
408 stored in the Active Subscriptions table.
409
410 @return All the PG_SubscriptionIndicationData instanceName.
411 */
412 Array<CIMObjectPath> enumerateSubscriptionIndicationDataInstanceNames();
413
414 /**
415 Gets the PG_SubscriptionIndicationData instance for the specified CIM
416 object path.
417
418 @param instanceName CIMObjectpath specifies a CIM instance to be
419 returned
420 @return The specified PG_SubscriptionIndicationData instance.
421 If the specified instance does not exist, throw a
422 CIMObjectNotFoundException
423 */
424 CIMInstance getSubscriptionIndicationDataInstance(
425 const CIMObjectPath& instanceName);
|
426 yi.zhou 1.18 #endif
|
427 kumpf 1.1
428 private:
429
|
430 aruran.ms 1.12 /** Copy Constructor just to avoid the compiler provided one.
431 */
432 SubscriptionTable ( const SubscriptionTable& subscriptionTable );
433
434 /** Overloaded Assignment Operator
435 */
436 SubscriptionTable& operator=( const SubscriptionTable& rhs );
437
|
438 kumpf 1.1 /**
|
439 r.kieninger 1.16 Generates a unique String key for the Active Subscriptions table
|
440 carolann.graves 1.11 from the subscription object path.
|
441 kumpf 1.1
442 @param subscription the subscription object path
443
444 @return the generated key
445 */
|
446 r.kieninger 1.16 String _generateActiveSubscriptionsKey (
|
447 kumpf 1.1 const CIMObjectPath & subscription) const;
448
449 /**
|
450 carolann.graves 1.10 Locks the _activeSubscriptionsTableLock for read access and looks
|
451 kumpf 1.1 up an entry in the Active Subscriptions table.
452
453 @param key the hash table key
454 @param tableEntry the table entry retrieved
455
456 @return true if the key is found in the table; false otherwise
457 */
458 Boolean _lockedLookupActiveSubscriptionsEntry (
|
459 r.kieninger 1.16 const String & key,
|
460 aruran.ms 1.8 ActiveSubscriptionsTableEntry & tableEntry) const;
|
461 kumpf 1.1
462 /**
463 Inserts an entry into the Active Subscriptions table. The caller
|
464 carolann.graves 1.10 must first lock the _activeSubscriptionsTableLock for write access.
|
465 kumpf 1.1
466 @param subscription the subscription instance
|
467 carolann.graves 1.10 @param providers the list of providers
|
468 kumpf 1.1 */
469 void _insertActiveSubscriptionsEntry (
470 const CIMInstance & subscription,
|
471 aruran.ms 1.9 const Array <ProviderClassList> & providers);
|
472 kumpf 1.1
473 /**
474 Removes an entry from the Active Subscriptions table. The caller
|
475 carolann.graves 1.10 must first lock the _activeSubscriptionsTableLock for write access.
|
476 kumpf 1.1
477 @param key the key of the entry to remove
478 */
479 void _removeActiveSubscriptionsEntry (
|
480 r.kieninger 1.16 const String & key);
|
481 kumpf 1.1
482 /**
483 Generates a unique String key for the Subscription Classes table from
484 the indication class name and source namespace name.
485
486 @param indicationClassName the indication class name
487 @param sourceNamespaceName the source namespace name
488
489 @return the generated key
490 */
491 String _generateSubscriptionClassesKey (
492 const CIMName & indicationClassName,
493 const CIMNamespaceName & sourceNamespaceName) const;
494
495 /**
496 Locks the _subscriptionClassesTableLock for read access and looks
497 up an entry in the Subscription Classes table.
498
499 @param key the hash table key
500 @param tableEntry the table entry retrieved
501
502 kumpf 1.1 @return true if the key is found in the table; false otherwise
503 */
504 Boolean _lockedLookupSubscriptionClassesEntry (
505 const String & key,
|
506 aruran.ms 1.8 SubscriptionClassesTableEntry & tableEntry) const;
|
507 kumpf 1.1
508 /**
|
509 carolann.graves 1.10 Inserts an entry into the Subscription Classes table. The caller must
510 first lock the _subscriptionClassesTableLock for write access.
|
511 kumpf 1.1
512 @param indicationClassName the indication class name
513 @param sourceNamespaceName the source namespace name
514 @param subscriptions the list of subscription instances
515 */
|
516 carolann.graves 1.10 void _insertSubscriptionClassesEntry (
|
517 kumpf 1.1 const CIMName & indicationClassName,
518 const CIMNamespaceName & sourceNamespaceName,
519 const Array <CIMInstance> & subscriptions);
520
521 /**
|
522 carolann.graves 1.10 Removes an entry from the Subscription Classes table. The caller must
523 first lock the _subscriptionClassesTableLock for write access.
|
524 kumpf 1.1
525 @param key the key of the entry to remove
526 */
|
527 carolann.graves 1.10 void _removeSubscriptionClassesEntry (
|
528 kumpf 1.1 const String & key);
529
530 /**
|
531 carolann.graves 1.14 Updates the providers for an entry in the Active Subscriptions table.
532 The caller must first lock the _activeSubscriptionsTableLock for write
533 access.
534
535 @param activeSubscriptionsKey the key of the entry to update
536 @param subscription the subscription instance for the entry
537 @param updatedProviderList the updated list of providers for the
538 entry (may be empty)
539 */
540 void _updateSubscriptionProviders (
|
541 r.kieninger 1.16 const String & activeSubscriptionsKey,
|
542 carolann.graves 1.14 const CIMInstance & subscription,
543 const Array <ProviderClassList> & updatedProviderList);
544
|
545 yi.zhou 1.18 #ifdef PEGASUS_ENABLE_INDICATION_COUNT
546 /**
547 Returns all the Active Subscriptions table entries.
548
549 @return An Array containing the complete list of
550 ActiveSubscriptionsTable entries.
551 */
552 Array<ActiveSubscriptionsTableEntry> _getAllActiveSubscriptionEntries();
553
554 /**
555 Gets filter name and handler name from the specified subscription.
556 The format of filter name is namespace:filtername where the
557 namespace is the namespace of filter instance created, and
558 the filtername is the value of property Name in the filter instance.
559 The format of handler name is namespace:classname.handlername where
560 namespace is the namespace of handler instance created, the classname
561 is the class of the handler instance, and handlername is the value
562 of property Name in the handler instance.
563
564 @param subscription Input subscription instance used to get
565 filterName and handlerName
566 yi.zhou 1.18 @param filterName Output string containing the colon-separated
567 the namespace of filter instance created and
568 the value of property Name in the filter
569 instance
570 @param handlerName Output string containing the colon-separated
571 the namespace of handler instance created and
572 the class of the handler instance with the
573 dot-connected the value of property Name in
|
574 yi.zhou 1.19 the Handler instance
|
575 yi.zhou 1.18 */
576 void _getFilterAndHandlerNames(
577 const CIMInstance& subscription,
578 String& filterName,
579 String& handlerName);
|
580 yi.zhou 1.19
581 /**
582 Gets handler name, filter name, source namespace, provider module name,
583 and provider name from a specified PG_SubscriptionIndicationData
584 instanceName
585
586 @param instanceName Input subscription indication data instance
587 object path used to get filterName, handlerName, sourceNamespace,
588 providerModuleName, and providerName.
589 @param filterName Output string containing the colon-separated
590 the namespace of filter instance created and the value of property
591 Name in the filter instance.
592 @param handlerName Output string containing the colon-separated the
593 the namespace of handler instance created and the class of the
594 handler instance with the dot-connected the value of property Name
595 in the handler instance.
596 @param sourceNS Output string containing source namespace of the
597 subscription.
598 @param providerModuleName Output string containing the provider module
599 name.
600 @param providerName Output string containing the provider name.
601 yi.zhou 1.19 */
602 void _getSubscriptionIndicationDataKeys(
603 const CIMObjectPath& instanceName,
604 String& filterName,
605 String& handlerName,
606 String& sourceNS,
607 String& providerModuleName,
608 String& providerName);
609
610 /**
611 Builds the filter object path by using the specified filterName.
612
613 @param filterName Input string containing the colon-separated
614 the namespace of filter instance created and the value of property
615 Name in the filter instance.
616 @return The created filter object path.
617 */
618 CIMObjectPath _buildFilterPath(const String& filterName);
619
620 /**
621 Builds the handler object path by using the specified handlerName.
622 yi.zhou 1.19
623 @param handlerName Input string containing the colon-separated the
624 namespace of handler instance created and the class of the handler
625 instance with the dot-connected the value of property Name in
626 the handler instance
627 @return The created handler object path.
628 */
629 CIMObjectPath _buildHandlerPath(const String& handlerName);
630
631 /**
632 Builds the subscription object path by using the specified filterName,
633 handlerName, and sourceNS.
634
635 @param filterName Input string containing the colon-separated
636 the namespace of filter instance created and the value of property
637 Name in the filter instance.
638 @param handlerName Input string containing the colon-separated the
639 namespace of handler instance created and the class of the handler
640 instance with the dot-connected the value of property Name in
641 the handler instance.
642 @param sourceNS Input string containing source namespace of the
643 yi.zhou 1.19 subscription.
644 @return The created subscription object path.
645 */
646 CIMObjectPath _buildSubscriptionPath(
647 const String& filterName,
648 const String& handlerName,
649 const String& sourceNS);
650
651 /**
652 Creates the subscription indication data instance by using the
653 specified filterName, handlerName, sourceNS, providerModuleName,
654 providerName, and matchedIndicationCount.
655
656 @param filterName Input string containing the colon-separated
657 the namespace of filter instance created and the value of property
658 Name in the filter instance.
659 @param handlerName Input string containing the colon-separated the
660 namespace of handler instance created and the class of the handler
661 instance with the dot-connected the value of property Name in
662 the handler instance.
663 @param sourceNS Input string containing source namespace of the
664 yi.zhou 1.19 subscription.
665 @param providerModuleName The provider module name used to build the
666 instance.
667 @param providerName The provider name used to build the instance.
668 @param matchedIndicationCount The matched indication count used to
669 build the instance.
670 @return The created subscription indication data instance.
671 */
672 CIMInstance _buildSubscriptionIndDataInstance(
673 const String& filterName,
674 const String& handlerName,
675 const String& sourceNS,
676 const String& providerModuleName,
677 const String& providerName,
678 Uint32 matchedIndicationCount);
679
680 /**
681 Builds the subscription indication data instance object path by using
682 specified filterName, handlerName, sourceNS, providerModuleName,
683 and providerName.
684
685 yi.zhou 1.19 @param filterName Input string containing the colon-separated
686 the namespace of filter instance created and the value of property
687 Name in the filter instance.
688 @param handlerName Input string containing the colon-separated the
689 namespace of handler instance created and the class of the handler
690 instance with the dot-connected the value of property Name in
691 the handler instance.
692 @param sourceNS Input string containing source namespace of the
693 subscription.
694 the specified parameters.
695 @param providerModuleName The provider module name used to build the
696 instance path.
697 @param providerName The provider name used to build the instance path.
698 @return The created subscription indication data instance object path.
699 */
700 CIMObjectPath _buildSubscriptionIndDataInstanceName(
701 const String& filterName,
702 const String& handlerName,
703 const String& sourceNS,
704 const String& providerModuleName,
705 const String& providerName);
706 yi.zhou 1.19
707 /**
708 Builds the PG_Provider instance object path by using specified
709 providerModuleName and providerName.
710 @param providerModuleName The provider module name used to build the
711 instance path.
712 @param providerName The provider name used to build the instance path.
713 @return The created PG_Provider instance object path.
714 */
715 CIMObjectPath _buildProviderPath(
716 const String& providerModuleName,
717 const String& providerName);
|
718 yi.zhou 1.18 #endif
719
|
720 carolann.graves 1.14 /**
|
721 kumpf 1.1 Active Subscriptions information table. Access to this table is
722 controlled by the _activeSubscriptionsTableLock.
723 */
|
724 aruran.ms 1.9 ActiveSubscriptionsTable _activeSubscriptionsTable;
|
725 kumpf 1.1
726 /**
727 A lock to control access to the _activeSubscriptionsTable. Before
728 accessing the _activeSubscriptionsTable, one must first lock this for
729 read access. Before updating the _activeSubscriptionsTable, one must
730 first lock this for write access.
731 */
|
732 aruran.ms 1.8 mutable ReadWriteSem _activeSubscriptionsTableLock;
|
733 kumpf 1.1
734 /**
735 Subscription Classes information table. Access to this table is
736 controlled by the _subscriptionClassesTableLock.
737 */
738 SubscriptionClassesTable _subscriptionClassesTable;
739
740 /**
741 A lock to control access to the _subscriptionClassesTable. Before
742 accessing the _subscriptionClassesTable, one must first lock this for
743 read access. Before updating the _subscriptionClassesTable, one must
744 first lock this for write access.
745 */
|
746 aruran.ms 1.8 mutable ReadWriteSem _subscriptionClassesTableLock;
|
747 kumpf 1.1
748 SubscriptionRepository * _subscriptionRepository;
749 };
750
751 PEGASUS_NAMESPACE_END
752
753 #endif /* Pegasus_SubscriptionTable_h */
|