1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- #include "AllObjectManagerUtil.h"
- #include "PhmsLogger.h"
- Mutex CAllObjectManagerUtil::m_mutex;
- string CAllObjectManagerUtil::m_stringPriorIp;
- void CAllObjectManagerUtil::InitializeSSL()
- {
- Mutex::ScopedLock lock(m_mutex);
- if(CNetThreadManager::m_map.size() == 0 && CPushObjectManager::m_map.size()==0)
- {
- Poco::Net::initializeSSL();
- }
- }
- void CAllObjectManagerUtil::UnInitializeSSL()
- {
- Mutex::ScopedLock lock(m_mutex);
- if(CNetThreadManager::m_map.size() == 0 && CPushObjectManager::m_map.size()==0)
- {
- Poco::Net::uninitializeSSL();
- }
- }
- void CAllObjectManagerUtil::InitializeLocale()
- {
- Mutex::ScopedLock lock(m_mutex);
- if(CNetThreadManager::m_map.size() == 0 && CPushObjectManager::m_map.size()==0)
- {
- std::locale::global(locale(locale("C"), "", locale::ctype));
- }
- }
- void CAllObjectManagerUtil::UnInitializeLocale()
- {
- Mutex::ScopedLock lock(m_mutex);
- if(CNetThreadManager::m_map.size() == 0 && CPushObjectManager::m_map.size()==0)
- {
- std::locale::global(locale("C"));
- }
- }
- void CAllObjectManagerUtil::ReleasePhmsLogger()
- {
- Mutex::ScopedLock lock(m_mutex);
- if(CNetThreadManager::m_map.size()==0 && CPushObjectManager::m_map.size()==0)
- {
- //ÊÍ·ÅÈÕÖ¾¶ÔÏó
- CPhmsLogger::ReleasePhmsLogger();
- }
- }
- void CAllObjectManagerUtil::SetPriorIp(string stringIp)
- {
- Mutex::ScopedLock lock(m_mutex);
- m_stringPriorIp = stringIp;
- }
- string CAllObjectManagerUtil::GetPriorIp()
- {
- return m_stringPriorIp;
- }
|