switch (commandId) {
case ClusteredQueryCommand.COMMAND_ID:
c = new ClusteredQueryCommand(cacheName);
break;
case IndexUpdateCommand.COMMAND_ID:
c = new IndexUpdateCommand(cacheName);
break;
default:
throw new IllegalArgumentException("Not registered to handle command id " + commandId);
}
c.setParameters(commandId, args);