if (!updateOptimization) {
return; // nothing to do
}
PHashMapLoadException loadException = null;
Iterator itr = tidMap.entrySet().iterator();
while (itr.hasNext()) {
Throwable ex = null;
Map.Entry entry = (Map.Entry)itr.next();
Object key = entry.getKey();
TransactionInfo value = (TransactionInfo)entry.getValue();
byte[] cData = null;
try {
cData = ((PHashMapMMF)tidMap).getClientData(key);
if (cData != null && cData.length > 0) {
int state = (int)cData[0]; // 1st byte is the modified state
value.getTransactionState().setState(state); // update txn state
// Now read in modified txn broker states
TransactionBroker[] bkrs = value.getTransactionBrokers();
if (bkrs != null) {
for (int i = 0, len = bkrs.length; i < len; i++) {
TransactionBroker bkr = bkrs[i];
// update bkr's state
boolean isComplete = ((int)cData[i+1] == 1); // 1 == true
bkr.setCompleted(isComplete);
}
}
}
} catch (Throwable e) {
ex = e;
}
if (ex != null) {
PHashMapLoadException le = new PHashMapLoadException(
"Failed to load client data [cData=" + cData + "]");
le.setKey(key);
le.setValue(value);
le.setNextException(loadException);
le.initCause(ex);
loadException = le;
}
}
if (loadException != null) {