int TalkServiceI::getUserOnlineStatV1(const long userId, const Ice::Current& current){ MilliTimer tStart; LOG_DEBUG("TalkServiceI::getUserOnlineStat => userId = " << userId); int stat = MY_INSTANCE(TalkServer).getUserOnlineStat(userId); LOG_TIME("TalkServiceI::getUserOnlineStat|" << tStart.elapsed() ); return stat; }
vector<int> TalkServiceI::getUsersOnlineStatSeq(const vector<long>& users, const Ice::Current& current){ MilliTimer tStart; LOG_DEBUG("TalkServiceI::getUsersOnlineStatSeq => size = " << users.size()); vector<int> intVec = MY_INSTANCE(TalkServer).getLocalUsersOnlineStatSeq(users); LOG_TIME("TalkServiceI::getUsersOnlineStatSeq|" << users.size() << "|" << tStart.elapsed() ); return intVec; }
void Router2TalkServiceI::forwardIq(const std::string& xmppString, const Ice::Current& current) { MilliTimer tStart; LOG_DEBUG("Router2TalkServiceI::forwordIq ==> begin."); int flag = router2talkServerPtr_->forwardIq(xmppString); if(flag < 0) { LOG_ERROR("Router2TalkServiceI::forwardIq ==> return error: "<<flag); } LOG_DEBUG("Route2TalkServiceI::forwordIq ==> end. use:"<<tStart.elapsed()); }
map<long, int> TalkServiceI::getUsersOnlineStatMapV1(const vector<long>& users, const Ice::Current& current){ LOG_DEBUG("TalkServiceI::getUsersOnlineStatMap => size = " << users.size()); MilliTimer tStart; vector<int> statVector = MY_INSTANCE(TalkServer).getLocalUsersOnlineStatSeq(users); map<long, int> statMap; for(size_t i = 0; i < statVector.size(); ++i){ statMap[users[i]] = statVector[i]; } LOG_TIME("TalkServiceI::getUsersOnlineStatMap|" << users.size() << "|" << tStart.elapsed() ); return statMap; }
void EndpointServiceProxy::deliverMsg(const long connectionId, const string& msg, long mid, int msgType){ MilliTimer tStart; ReadLock lock(mutex_); EndpointServicePrx proxy = getProxy(connectionId); if(!proxy){ LOG_ERROR("EndpointServiceProxy::deliverMsg => get proxy failure : cid = " << connectionId); return; } try{ proxy->deliverMsg(connectionId, msg); }catch(std::exception& e){ std::cout<<"EndpointServicePrx deliverMsg catch exception ="<<e.what()<<std::endl; }catch(...){ std::cout<<"EndpointServicePrx deliverMsg unknow exception"<<std::endl; } LOG_TIME("EndpointServicePrx::deliverMsg|" << tStart.elapsed() ); return; }