public void applyTransactions(Address sender, int topologyId, Collection<TransactionInfo> transactions) {
log.debugf("Applying %d transactions transferred from %s", transactions.size(), sender);
if (configuration.transaction().transactionMode().isTransactional()) {
for (TransactionInfo transactionInfo : transactions) {
CacheTransaction tx = transactionTable.getLocalTransaction(transactionInfo.getGlobalTransaction());
if (tx == null) {
tx = transactionTable.getRemoteTransaction(transactionInfo.getGlobalTransaction());
if (tx == null) {
tx = transactionTable.createRemoteTransaction(transactionInfo.getGlobalTransaction(), transactionInfo.getModifications());
((RemoteTransaction) tx).setMissingLookedUpEntries(true);
}
}
for (Object key : transactionInfo.getLockedKeys()) {
tx.addBackupLockForKey(key);
}
}
}
}