void CRUTbl::CheckIfLongLockNeeded() { if (TRUE == IsLongLockNeeded()) { // Someone else (the equivalence set analyzer) // has already set the flag. return; } CDDObject::ERangeLogType rlType = GetRangeLogType(); if (CDDObject::eAUTOMATIC == rlType // Case #1 || CDDObject::eMIXED == rlType) { SetLongLockIsNeeded(); return; } DSListPosition pos = pOnRequestInvolvedMVsUsingMe_->GetHeadPosition(); while (NULL != pos) { CRUMV *pMV = pOnRequestInvolvedMVsUsingMe_->GetNext(pos); if (FALSE == pMV->IsSelfMaintainable() // Case #2 || TRUE == pMV->WillBeRecomputed() // Case #3 ) { SetLongLockIsNeeded(); return; } } }
void CRUTbl::BuildEmpCheckVector() { // Verify that the vector is non-initialized RUASSERT(FALSE == pEmpCheckVector_->IsValid()); // CRUEmpCheckTask is created only if there is // at least one incrementally refreshed MV. RUASSERT(FALSE == pIncInvolvedMVsUsingMe_->IsEmpty()); TInt64 tblUid = GetUID(); DSListPosition lpos = pIncInvolvedMVsUsingMe_->GetHeadPosition(); while (NULL != lpos) { CRUMV *pMV = pIncInvolvedMVsUsingMe_->GetNext(lpos); RUASSERT (TRUE == pMV->IsInvolved() && FALSE == pMV->WillBeRecomputed()); // Register the epoch in the vector ... pEmpCheckVector_->AddEpochForCheck(pMV->GetEpoch(tblUid)); } pEmpCheckVector_->Build(); }
void CRUTbl::BuildListOfIncrementalInvolvedMVsUsingMe() { // Verify that the list is not initialized already RUASSERT(TRUE == pIncInvolvedMVsUsingMe_->IsEmpty()); DSListPosition pos = pOnRequestInvolvedMVsUsingMe_->GetHeadPosition(); while (NULL != pos) { CRUMV *pMV = pOnRequestInvolvedMVsUsingMe_->GetNext(pos); RUASSERT(CDDObject::eON_REQUEST == pMV->GetRefreshType() && TRUE == pMV->IsInvolved() ); if (TRUE == pMV->WillBeRecomputed()) { continue; } pIncInvolvedMVsUsingMe_->AddTail(pMV); CDDObject::EMVQueryType qt = pMV->GetQueryType(); if (CDDObject::eMJV == qt || CDDObject::eOTHER == qt // Is this MJV on single table? ) { isUsedByIncrementalMJV_ = TRUE; } } }