Beispiel #1
0
MojErr MojDbQuotaEngine::applyUsage(MojDbStorageTxn* txn)
{
    LOG_TRACE("Entering function %s", __FUNCTION__);

	for (OffsetMap::ConstIterator i = txn->m_offsetMap.begin();
		 i != txn->m_offsetMap.end(); ++i) {
		MojErr err = applyOffset(i.key(), i.value()->offset(), txn);
		MojErrCheck(err);

		if(!m_db->getQuotaAlert().isEmpty()) //optimization for empty list
		{
			err = informQuotaSubscribers(i.key());
			MojErrCheck(err);
		}
	}
	return MojErrNone;
}
MojErr MojDbQuotaEngine::applyUsage(MojDbStorageTxn* txn)
{
	MojLogTrace(s_log);

	for (OffsetMap::ConstIterator i = txn->m_offsetMap.begin();
		 i != txn->m_offsetMap.end(); ++i) {
		MojErr err = applyOffset(i.key(), i.value()->offset(), txn);
		MojErrCheck(err);
	}
	return MojErrNone;
}