for (int j = 0; j < mNumberOfResources; j++)
{
for (int i = 0; i < mMaxIteration; i++)
{
//start transaction
AtomicAction a = new AtomicAction();
a.begin();
int incValue = mLockRecordList[j].increase();
if (i % 2 == 0)
{
a.commit();
expectedValue[j] += incValue;
}
else
{
a.abort();
}
}
}
for (int j = 0; j < mNumberOfResources; j++)
{
for (int i = 0; i < mMaxIteration; i++)
{
AtomicAction b = new AtomicAction();
b.begin();
int incValue = mLockRecordList[j].increase();
if (i % 2 == 0)
{
b.commit();
expectedValue[j] += incValue;
}
else
{
b.abort();
}
}
}
}
catch (Exception e)