version 1.1.2.7, 2009/12/03 15:53:26
|
version 1.4, 2012/11/06 13:53:15
|
|
|
return _theInstance; | return _theInstance; |
} | } |
| |
#ifdef PEGASUS_USE_SCMO_CLASS_CACHE |
|
|
|
SCMOClassCache::~SCMOClassCache() | SCMOClassCache::~SCMOClassCache() |
{ | { |
// Signal to all callers and work in progress that the SMOClassCache | // Signal to all callers and work in progress that the SMOClassCache |
|
|
(Uint64(nameSpaceName[0]) << 8 ) | | (Uint64(nameSpaceName[0]) << 8 ) | |
Uint64(nameSpaceName[nameSpaceNameLen-1]); | Uint64(nameSpaceName[nameSpaceNameLen-1]); |
| |
/* |
|
fprintf(stderr,"Class Name(%s) \'%04X%02X%02X\' " |
|
"Name Space(%s) \'%04X%02X%02X\' " |
|
"Key = %016llX\n", |
|
className,classNameLen,className[0],className[classNameLen-1], |
|
nameSpaceName,nameSpaceNameLen,nameSpaceName[0], |
|
nameSpaceName[nameSpaceNameLen-1],key); |
|
*/ |
|
return key; | return key; |
} | } |
| |
|
|
{ | { |
// The cache is going to be destroyed. | // The cache is going to be destroyed. |
// The caller will never get the lock. | // The caller will never get the lock. |
return false; |
break; |
} | } |
| |
// If the lock counter not 1,an other caller is reading the entry. | // If the lock counter not 1,an other caller is reading the entry. |
|
|
} | } |
#endif | #endif |
| |
|
|
#else // PEGASUS_USE_SCMO_CLASS_CACHE |
|
SCMOClass SCMOClassCache::getSCMOClass( |
|
const char* nsName, |
|
Uint32 nsNameLen, |
|
const char* className, |
|
Uint32 classNameLen) |
|
{ |
|
if (nsName && className && nsNameLen && classNameLen) |
|
{ |
|
|
|
PEGASUS_ASSERT(_resolveCallBack); |
|
|
|
|
|
SCMOClass tmp = _resolveCallBack( |
|
CIMNamespaceNameCast(String(nsName,nsNameLen)), |
|
CIMNameCast(String(className,classNameLen))); |
|
|
|
if (tmp->isEpmpty()) |
|
{ |
|
// The requested class was not found ! |
|
// The modify lock is destroyed automaticaly ! |
|
return SCMOClass(); |
|
} |
|
|
|
return SCMOClass(tmp); |
|
} |
|
|
|
return SCMOClass(); |
|
|
|
} |
|
|
|
void SCMOClassCache::removeSCMOClass( |
|
CIMNamespaceName cimNameSpace, |
|
CIMName cimClassName) |
|
{ |
|
} |
|
|
|
|
|
void SCMOClassCache::clear() |
|
{ |
|
} |
|
|
|
# ifdef PEGASUS_DEBUG |
|
void SCMOClassCache::DisplayCacheStatistics(){} |
|
# endif |
|
|
|
#endif |
|
PEGASUS_NAMESPACE_END | PEGASUS_NAMESPACE_END |