for (ReplicableCommand nested : pc.getModifications()) {
initializeReplicableCommand(nested, false);
}
pc.markTransactionAsRemote(isRemote);
if (configuration.deadlockDetection().enabled() && isRemote) {
DldGlobalTransaction transaction = (DldGlobalTransaction) pc.getGlobalTransaction();
transaction.setLocksHeldAtOrigin(pc.getAffectedKeys());
}
break;
case CommitCommand.COMMAND_ID:
case VersionedCommitCommand.COMMAND_ID:
case TotalOrderCommitCommand.COMMAND_ID:
case TotalOrderVersionedCommitCommand.COMMAND_ID:
CommitCommand commitCommand = (CommitCommand) c;
commitCommand.init(interceptorChain, icc, txTable);
commitCommand.markTransactionAsRemote(isRemote);
break;
case RollbackCommand.COMMAND_ID:
case TotalOrderRollbackCommand.COMMAND_ID:
RollbackCommand rollbackCommand = (RollbackCommand) c;
rollbackCommand.init(interceptorChain, icc, txTable);
rollbackCommand.markTransactionAsRemote(isRemote);
break;
case ClearCommand.COMMAND_ID:
ClearCommand cc = (ClearCommand) c;
cc.init(notifier);
break;
case ClusteredGetCommand.COMMAND_ID:
ClusteredGetCommand clusteredGetCommand = (ClusteredGetCommand) c;
clusteredGetCommand.initialize(icc, this, entryFactory,
interceptorChain, distributionManager, txTable,
configuration.dataContainer().keyEquivalence());
break;
case LockControlCommand.COMMAND_ID:
LockControlCommand lcc = (LockControlCommand) c;
lcc.init(interceptorChain, icc, txTable);
lcc.markTransactionAsRemote(isRemote);
if (configuration.deadlockDetection().enabled() && isRemote) {
DldGlobalTransaction gtx = (DldGlobalTransaction) lcc.getGlobalTransaction();
RemoteTransaction transaction = txTable.getRemoteTransaction(gtx);
if (transaction != null) {
if (!configuration.clustering().cacheMode().isDistributed()) {
Set<Object> keys = txTable.getLockedKeysForRemoteTransaction(gtx);
GlobalTransaction gtx2 = transaction.getGlobalTransaction();
((DldGlobalTransaction) gtx2).setLocksHeldAtOrigin(keys);
gtx.setLocksHeldAtOrigin(keys);
} else {
GlobalTransaction gtx2 = transaction.getGlobalTransaction();
((DldGlobalTransaction) gtx2).setLocksHeldAtOrigin(gtx.getLocksHeldAtOrigin());
}
}
}
break;
case StateRequestCommand.COMMAND_ID: