void TripodClient::GetIntList(const std::string& key, IntList& value, int begin, int limit) { RedisCacheClientPtr client = GetRedisCacheClient(); if (!client) { MCE_INFO("TripodClient::GetIntList() RedisCacheClient is NULL"); return; } const IntList& list = client->GetIntList(key, begin, limit, namespaceId_, businessId_); if (!list.empty()) { value.insert(value.end(), list.begin(), list.end()); } }
int main () { qse_openstdsios (); T* x; //QSE::StdMmgr* mmgr = QSE::StdMmgr::getDFL(); //QSE::HeapMmgr heap_mmgr (QSE::Mmgr::getDFL(), 1000000); //QSE::Mmgr* mmgr = &heap_mmgr; QSE::Mmgr* mmgr = QSE_NULL; /* x = new(mmgr) T; //[10]; printf ("x====> %p\n", x); x->~T(); //for (int i = 0; i < 10; i++) x[i].~T(); //::operator delete[] (x, mmgr); ::operator delete (x, mmgr); //delete[] x; printf ("----------------------\n"); T* y = new(10) T; y->~T(); ::operator delete(y); printf ("----------------------\n"); */ try { T t1,t2,t3; #if 0 printf ("----------------------\n"); { QSE::LinkedList<T> l (mmgr, 100); printf ("----------------------\n"); l.append (t1); printf ("----------------------\n"); l.append (t2); l.append (t3); printf ("================\n"); QSE::LinkedList<T> l2 (mmgr, 100); l2 = l; } printf ("----------------------\n"); #endif //QSE::HashList<T> h (mmgr, 1000, 75, 1000); QSE::HashList<T> h (mmgr, 1000, 75, 500); for (int i = 0; i < 1000; i++) { T x(i); h.insert (x); } printf ("h.getSize() => %d\n", (int)h.getSize()); QSE::HashList<T> h2 (mmgr, 1000, 75, 700); h2 = h; for (QSE::HashList<T>::Iterator it = h2.getIterator(); it.isLegit(); it++) { printf ("%d\n", (*it).getValue()); } printf ("----------------------\n"); printf ("%p\n", h2.getHeadNode()); printf ("----------------------\n"); IntList hl; IntList::Iterator it; hl.insert (10); hl.insert (150); hl.insert (200); for (it = hl.getIterator(); it.isLegit(); it++) { printf ("%d\n", *it); } printf ("----------------------\n"); { const QSE::HashList<T>& h3 = h2; const T* tt = h3.heterofindValue<int,IntHasher,IntIsEqual> (100); if (tt) printf ("%d:%d\n", tt->getValue(), tt->getY()); else printf ("not found...\n"); } printf ("----------------------\n"); } catch (QSE::Exception& e) { qse_printf (QSE_T("Exception: %s\n"), QSE_EXCEPTION_NAME(e)); } qse_closestdsios (); return 0; }