示例#1
0
uint64
O2KeyDB::
GetKeyList(O2KeyList &ret, time_t date_le)
{
	Lock();
	{
		O2Keys::iterator it;
		for (it = Keys.begin(); it != Keys.end(); it++) {
			if (date_le == 0 || it->date < date_le)
				ret.push_back(*it);
		}
	}
	Unlock();

	return (ret.size());
}
示例#2
0
uint64
O2KeyDB::
GetKeyList(const hashT &target, O2KeyList &ret)
{
	Lock();
	{
		O2Keys::nth_index<1>::type& keys = Keys.get<1>();
		O2Keys::nth_index_iterator<1>::type it1 = keys.lower_bound(target);
		O2Keys::nth_index_iterator<1>::type it2 = keys.upper_bound(target);
		O2Keys::nth_index_iterator<1>::type it;
		for (it = it1; it != it2; it++) {
			ret.push_back(*it);
		}
	}
	Unlock();

	return (ret.size());
}
示例#3
0
	size_t GetRequestQueueCount(void)
	{
		return (RequestQueue.size());
	}