本文整理汇总了C++中ice::ConnectionPtr::toString方法的典型用法代码示例。如果您正苦于以下问题:C++ ConnectionPtr::toString方法的具体用法?C++ ConnectionPtr::toString怎么用?C++ ConnectionPtr::toString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ice::ConnectionPtr
的用法示例。
在下文中一共展示了ConnectionPtr::toString方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: getSearchCacheList
Int2SearchCacheResultMap SearchCacheManagerI::getSearchCacheList(const ::MyUtil::IntSeq& userIds, const Ice::Current& ic) {
struct timeval tvStart;
struct timeval tvStart1;
struct timeval tvEnd;
MyUtil::LongSeq uids;
gettimeofday(&tvStart, NULL);
Int2SearchCacheResultMap result;
for (MyUtil::IntSeq::const_iterator it = userIds.begin(); it!= userIds.end(); ++it) {
BinStringPtr binStrPtr = ObjectCacheHelper::instance().findObject<BinStringPtr> (*it);
if (binStrPtr.get() != NULL) {
SearchMemCacheDataPtr pSCData = new SearchMemCacheData();
char* pBuf = NULL;
int len = 0;
binStrPtr->getBuf(&pBuf, &len);
if (pBuf==NULL || len <= 0) continue;
if (pSCData->Unserialize(pBuf, len)) {
result[*it] = pSCData->getProperties();
}
} else {
//scq
if (*it != 0) {
uids.push_back(*it);
}
}
}
gettimeofday(&tvStart1, NULL);
if (!uids.empty())
_invokeLoad.invoke(uids);
gettimeofday(&tvEnd, NULL);
int start = tvStart.tv_sec*1000000 + tvStart.tv_usec;
int start1 = tvStart1.tv_sec*1000000 + tvStart1.tv_usec;
int end = tvEnd.tv_sec*1000000 + tvEnd.tv_usec;
if ((end - start) > 5000) {
const Ice::ConnectionPtr con = ic.con;
if (con.get() != NULL) {
MCE_INFO(con->toString() << " Get SearchCache List: time=" << end-start << "us " <<
"invokeLoad: time=" << end - start1 << "us total=" << userIds.size());
}
}
return result;
}
示例2: update
void SearchLogicManagerI::update(const UpdateUnitSeq& updateUnits, const Ice::Current& ic) {
const Ice::ConnectionPtr con = ic.con;
if (con.get() != NULL) {
MCE_DEBUG("SearchLogicManagerI::update" << updateUnits.size() << " objects. invoker is :" << con->toString() << ", facet=" << ic.facet << ", operation=" << ic.operation << ", requestId=" << ic.requestId << ", id.name=" << ic.id.name << ", id.category=" << ic.id.category << ", adapter.name=" << ic.adapter->getName());
}
if (updateUnits.empty())
return;
for(UpdateUnitSeq::const_iterator iter=updateUnits.begin(); iter!=updateUnits.end(); ++iter) {
int user_id = iter->id;
if (user_id >= 0) {
(_vecMessageQueueThread.at(user_id % kMessageQueueThreadNum))->invoke(*iter);
}
}
}