version 1.8.2.4, 2004/03/24 00:50:34
|
version 1.23, 2004/06/29 23:42:54
|
|
|
// (carolann_graves@hp.com) | // (carolann_graves@hp.com) |
// Mike Day, IBM (mdday@us.ibm.com) | // Mike Day, IBM (mdday@us.ibm.com) |
// Adrian Schuur, IBM (schuur@de.ibm.com) | // Adrian Schuur, IBM (schuur@de.ibm.com) |
|
// Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com) |
// | // |
//%///////////////////////////////////////////////////////////////////////////// | //%///////////////////////////////////////////////////////////////////////////// |
| |
|
|
#define Pegasus_ProviderManagerService_h | #define Pegasus_ProviderManagerService_h |
| |
#include <Pegasus/Common/Config.h> | #include <Pegasus/Common/Config.h> |
#include <Pegasus/Common/Thread.h> |
|
#include <Pegasus/Common/Array.h> |
|
#include <Pegasus/Common/Pair.h> |
|
#include <Pegasus/Common/MessageQueueService.h> | #include <Pegasus/Common/MessageQueueService.h> |
|
#include <Pegasus/Common/CIMMessage.h> |
|
#include <Pegasus/Common/OperationContextInternal.h> |
|
#include <Pegasus/Common/AutoPtr.h> |
#include <Pegasus/Repository/CIMRepository.h> | #include <Pegasus/Repository/CIMRepository.h> |
|
#include <Pegasus/Server/ProviderRegistrationManager/ProviderRegistrationManager.h> |
| |
#include <Pegasus/ProviderManager2/SafeQueue.h> | #include <Pegasus/ProviderManager2/SafeQueue.h> |
#include <Pegasus/ProviderManager2/ProviderManager.h> |
#include <Pegasus/ProviderManager2/ProviderManagerRouter.h> |
| |
#include <Pegasus/ProviderManager2/Linkage.h> | #include <Pegasus/ProviderManager2/Linkage.h> |
| |
PEGASUS_NAMESPACE_BEGIN | PEGASUS_NAMESPACE_BEGIN |
| |
#define IDLE_LIMIT 100 |
#define IDLE_LIMIT 300 |
|
|
class ProviderRegistrationManager; |
|
class ProviderManager; |
|
| |
class PEGASUS_PPM_LINKAGE ProviderManagerService : public MessageQueueService | class PEGASUS_PPM_LINKAGE ProviderManagerService : public MessageQueueService |
{ | { |
|
|
virtual ~ProviderManagerService(void); | virtual ~ProviderManagerService(void); |
| |
// temp | // temp |
void unload_idle_providers(void); |
void unloadIdleProviders(); |
|
|
|
static void indicationCallback(CIMProcessIndicationRequestMessage* request); |
| |
protected: | protected: |
virtual Boolean messageOK(const Message * message); | virtual Boolean messageOK(const Message * message); |
|
|
| |
virtual void _handle_async_request(AsyncRequest * request); | virtual void _handle_async_request(AsyncRequest * request); |
| |
static CIMRepository* _repository; |
CIMRepository* _repository; |
| |
private: | private: |
//static PEGASUS_THREAD_RETURN PEGASUS_THREAD_CDECL handleServiceOperation(void * arg) throw(); | //static PEGASUS_THREAD_RETURN PEGASUS_THREAD_CDECL handleServiceOperation(void * arg) throw(); |
|
|
//void handlePauseService() thorw(); | //void handlePauseService() thorw(); |
//void handleResumeService() thorw(); | //void handleResumeService() thorw(); |
| |
static PEGASUS_THREAD_RETURN PEGASUS_THREAD_CDECL handleCimOperation(void * arg) throw(); |
static PEGASUS_THREAD_RETURN PEGASUS_THREAD_CDECL handleCimOperation( |
|
void * arg) throw(); |
|
|
|
void handleCimRequest(AsyncOpNode *op, Message* message); |
|
|
|
static PEGASUS_THREAD_RETURN PEGASUS_THREAD_CDECL |
|
_unloadIdleProvidersHandler(void* arg) throw(); |
| |
ProviderManager *locateProviderManager(const Message *m, String &itf); |
void _updateProviderModuleStatus( |
void handleCimRequest(AsyncOpNode *op, const Message * message); |
CIMInstance& providerModule, |
|
Uint16 fromStatus, |
|
Uint16 toStatus); |
| |
private: | private: |
SafeQueue<AsyncOpNode *> _incomingQueue; | SafeQueue<AsyncOpNode *> _incomingQueue; |
SafeQueue<AsyncOpNode *> _outgoingQueue; | SafeQueue<AsyncOpNode *> _outgoingQueue; |
| |
private: |
ProviderManagerRouter* _providerManagerRouter; |
//Array<Pair<ProviderManager *, ProviderManagerModule> > _providerManagers; |
|
|
ProviderRegistrationManager* _providerRegistrationManager; |
|
|
|
static Uint32 _indicationServiceQueueId; |
| |
|
/** |
|
Indicates the number of threads currently attempting to unload idle |
|
providers. This value is used to prevent multiple threads from |
|
unloading idle providers at the same time. |
|
*/ |
|
AtomicInt _unloadIdleProvidersBusy; |
}; | }; |
| |
PEGASUS_NAMESPACE_END | PEGASUS_NAMESPACE_END |