if (distributionManager.isAffectedByRehash(clusteredGet.getKey()))
return UnsureResponse.INSTANCE;
return SuccessfulResponse.create(returnValue);
} else if (command instanceof SingleRpcCommand) {
SingleRpcCommand src = (SingleRpcCommand) command;
ReplicableCommand c = src.getCommand();
byte commandId = c.getCommandId();
if (c instanceof WriteCommand) {
if (returnValue == null) return null;
// check if this is successful.
WriteCommand wc = (WriteCommand) c;
return handleWriteCommand(wc, returnValue);
} else if (commandId == MapCombineCommand.COMMAND_ID ||
commandId == ReduceCommand.COMMAND_ID ||
commandId == DistributedExecuteCommand.COMMAND_ID) {
// Even null values should be wrapped in this case.
return SuccessfulResponse.create(returnValue);
} else if (c.isReturnValueExpected()) {
if (returnValue == null) return null;
return SuccessfulResponse.create(returnValue);
}
} else if (command.isReturnValueExpected()) {
return SuccessfulResponse.create(returnValue);