Exemplo n.º 1
0
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;
		}
	}
}