for (ReplicableCommand nested : pc.getModifications()) {
initializeReplicableCommand(nested, false);
}
pc.markTransactionAsRemote(isRemote);
if (configuration.isEnableDeadlockDetection() && isRemote) {
DldGlobalTransaction transaction = (DldGlobalTransaction) pc.getGlobalTransaction();
transaction.setLocksHeldAtOrigin(pc.getAffectedKeys());
}
break;
case CommitCommand.COMMAND_ID:
CommitCommand commitCommand = (CommitCommand) c;
commitCommand.init(interceptorChain, icc, txTable);
commitCommand.markTransactionAsRemote(isRemote);
break;
case RollbackCommand.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, interceptorChain, distributionManager);
break;
case LockControlCommand.COMMAND_ID:
LockControlCommand lcc = (LockControlCommand) c;
lcc.init(interceptorChain, icc, txTable);
lcc.markTransactionAsRemote(isRemote);
if (configuration.isEnableDeadlockDetection() && isRemote) {
DldGlobalTransaction gtx = (DldGlobalTransaction) lcc.getGlobalTransaction();
RemoteTransaction transaction = txTable.getRemoteTransaction(gtx);
if (transaction != null) {
if (!configuration.getCacheMode().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 RehashControlCommand.COMMAND_ID: