📄 subscriptiontable.h
字号:
*/ Array <CIMInstance> getMatchingSubscriptions ( const CIMName & supportedClass, const Array <CIMNamespaceName> nameSpaces, const Boolean checkProvider = false, const CIMInstance & provider = CIMInstance ()) const; /** Retrieves list of enabled subscription instances in all namespaces, that are served by the specified provider. This function is called when a provider is disabled. In the Active Subscriptions table, the specified provider is removed from the list of providers serving the subscription. Note: this method may call the SubscriptionRepository reconcileFatalError() method, which may call the CIMRepository modifyInstance() or deleteInstance() method, while a WriteLock is held on the Active Subscriptions table. The determination of whether the SubscriptionRepository reconcileFatalError() method must be called (and whether the repository must be updated) requires a lookup of the Active Subscriptions table to see if any other providers are serving the subscription. The SubscriptionRepository reconcileFatalError() method does not need to access the repository to determine the subscription policy, but if the policy is Disable or Remove, it does need to call the CIMRepository modifyInstance() or deleteInstance() method. The return value from the SubscriptionRepository reconcileFatalError() method (True if the subscription was successfully disabled or removed) in turn determines whether the entry in the Active Subscriptions table must be updated or removed. @param provider the provider instance @return list of CIMInstance subscriptions */ Array <CIMInstance> reflectProviderDisable ( const CIMInstance & provider); /** Retrieves a list of subscription table entries for subscriptions that were being served by providers in the specified provider module, where the subscription creator matches the specified provider module userName. The Active Subscriptions table is updated to reflect the fact that these subscriptions are no longer being served by the provider(s) in the failed provider module. This method is called when notification is received that the specified provider module has failed. In the Active Subscriptions table, any provider in the specified provider module is removed from the list of providers serving the subscription. The returned list of Active Subscriptions table entries includes for each subscription only those providers that are in the specified (failed) provider module and therefore are no longer serving the subscription. @param moduleName the provider module name @param userName the user name for the context in which the provider module was invoked @param authenticationEnabled indicates whether authentication is currently enabled @return list of ActiveSubscriptionsTableEntry structs including the subscriptions served by providers in the specified provider module */ Array <ActiveSubscriptionsTableEntry> reflectProviderModuleFailure ( const String & moduleName, const String & userName, Boolean authenticationEnabled); /** Determines if the specified provider is in the list of providers serving the subscription. @param provider the provider instance @param tableValue the Active Subscriptions Table entry @return The index of the provider in the list, if found; PEG_NOT_FOUND otherwise */ Uint32 providerInList (const CIMInstance & provider, const ActiveSubscriptionsTableEntry & tableValue) const; /** Determines if the specified class is in the list of indication subclasses served by the specified provider, serving the subscription. @param className the class name @param providerClasses a provider serving the subscription, with the indication classes served @return The index of the class name in the list, if found; PEG_NOT_FOUND otherwise */ Uint32 classInList (const CIMName & className, const ProviderClassList & providerClasses) const; /** Removes all entries from the Active Subscriptions and Subscription Classes tables. */ void clear ();private: /** Copy Constructor just to avoid the compiler provided one. */ SubscriptionTable ( const SubscriptionTable& subscriptionTable ); /** Overloaded Assignment Operator */ SubscriptionTable& operator=( const SubscriptionTable& rhs ); /** Generates a unique CIMObjectPath key for the Active Subscriptions table from the subscription object path. @param subscription the subscription object path @return the generated key */ CIMObjectPath _generateActiveSubscriptionsKey ( const CIMObjectPath & subscription) const; /** Locks the _activeSubscriptionsTableLock for read access and looks up an entry in the Active Subscriptions table. @param key the hash table key @param tableEntry the table entry retrieved @return true if the key is found in the table; false otherwise */ Boolean _lockedLookupActiveSubscriptionsEntry ( const CIMObjectPath & key, ActiveSubscriptionsTableEntry & tableEntry) const; /** Inserts an entry into the Active Subscriptions table. The caller must first lock the _activeSubscriptionsTableLock for write access. @param subscription the subscription instance @param providers the list of providers */ void _insertActiveSubscriptionsEntry ( const CIMInstance & subscription, const Array <ProviderClassList> & providers); /** Removes an entry from the Active Subscriptions table. The caller must first lock the _activeSubscriptionsTableLock for write access. @param key the key of the entry to remove */ void _removeActiveSubscriptionsEntry ( const CIMObjectPath & key); /** Generates a unique String key for the Subscription Classes table from the indication class name and source namespace name. @param indicationClassName the indication class name @param sourceNamespaceName the source namespace name @return the generated key */ String _generateSubscriptionClassesKey ( const CIMName & indicationClassName, const CIMNamespaceName & sourceNamespaceName) const; /** Locks the _subscriptionClassesTableLock for read access and looks up an entry in the Subscription Classes table. @param key the hash table key @param tableEntry the table entry retrieved @return true if the key is found in the table; false otherwise */ Boolean _lockedLookupSubscriptionClassesEntry ( const String & key, SubscriptionClassesTableEntry & tableEntry) const; /** Inserts an entry into the Subscription Classes table. The caller must first lock the _subscriptionClassesTableLock for write access. @param indicationClassName the indication class name @param sourceNamespaceName the source namespace name @param subscriptions the list of subscription instances */ void _insertSubscriptionClassesEntry ( const CIMName & indicationClassName, const CIMNamespaceName & sourceNamespaceName, const Array <CIMInstance> & subscriptions); /** Removes an entry from the Subscription Classes table. The caller must first lock the _subscriptionClassesTableLock for write access. @param key the key of the entry to remove */ void _removeSubscriptionClassesEntry ( const String & key); /** Updates the providers for an entry in the Active Subscriptions table. The caller must first lock the _activeSubscriptionsTableLock for write access. @param activeSubscriptionsKey the key of the entry to update @param subscription the subscription instance for the entry @param updatedProviderList the updated list of providers for the entry (may be empty) */ void _updateSubscriptionProviders ( const CIMObjectPath & activeSubscriptionsKey, const CIMInstance & subscription, const Array <ProviderClassList> & updatedProviderList); /** Active Subscriptions information table. Access to this table is controlled by the _activeSubscriptionsTableLock. */ ActiveSubscriptionsTable _activeSubscriptionsTable; /** A lock to control access to the _activeSubscriptionsTable. Before accessing the _activeSubscriptionsTable, one must first lock this for read access. Before updating the _activeSubscriptionsTable, one must first lock this for write access. */ mutable ReadWriteSem _activeSubscriptionsTableLock; /** Subscription Classes information table. Access to this table is controlled by the _subscriptionClassesTableLock. */ SubscriptionClassesTable _subscriptionClassesTable; /** A lock to control access to the _subscriptionClassesTable. Before accessing the _subscriptionClassesTable, one must first lock this for read access. Before updating the _subscriptionClassesTable, one must first lock this for write access. */ mutable ReadWriteSem _subscriptionClassesTableLock; SubscriptionRepository * _subscriptionRepository;};PEGASUS_NAMESPACE_END#endif /* Pegasus_SubscriptionTable_h */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -