}
CommandsFactory commandsFactory = cr.getCommandsFactory();
// initialize this command with components specific to the intended cache instance
commandsFactory.initializeReplicableCommand(cmd, true);
if (cmd instanceof TotalOrderPrepareCommand) {
final TotalOrderRemoteTransactionState state = ((TotalOrderPrepareCommand) cmd).getOrCreateState();
final TotalOrderManager totalOrderManager = cr.getTotalOrderManager();
totalOrderManager.ensureOrder(state, ((PrepareCommand) cmd).getAffectedKeysToLock(false));
totalOrderExecutorService.execute(new BlockingRunnable() {