Source:
public void executeCommand(Command command, ExecutionHandlerContext context) { List<byte[]> commandElems = command.getProcessedCommand(); if (commandElems.size() != 3) { command.setResponse( Coder.getErrorResponse( context.getByteBufAllocator(), getArgsError())); return; } RegionProvider regionProvider = context.getRegionProvider(); ByteArrayWrapper wKey = command.getKey(); byte[] timestampByteArray = commandElems.get(TIMESTAMP_INDEX); long timestamp; try { timestamp = Coder.bytesToLong(timestampByteArray); } catch (NumberFormatException e) { command.setResponse( Coder.getErrorResponse(context.getByteBufAllocator(), ERROR_NOT_INTEGER)); return; } if (!timeUnitMillis()) { timestamp = timestamp * millisInSecond; } long currentTimeMillis = System.currentTimeMillis(); if (timestamp <= currentTimeMillis) { int result = NOT_SET; RedisDataType redisDataType = context.getKeyRegistrar().getType(wKey); if (redisDataType != null) { regionProvider.getRegionForType(redisDataType).remove(wKey); result = SET; } command.setResponse( Coder.getIntegerResponse( context.getByteBufAllocator(), result)); return; } long delayMillis = timestamp - currentTimeMillis; boolean expirationSet = false; if (regionProvider.hasExpiration(wKey)) { expirationSet = regionProvider.modifyExpiration(wKey, delayMillis); } else { expirationSet = regionProvider.setExpiration(wKey, delayMillis); } if (expirationSet) { command.setResponse(Coder.getIntegerResponse(context.getByteBufAllocator(), SET)); } else { command.setResponse(Coder.getIntegerResponse(context.getByteBufAllocator(), NOT_SET)); } }

Target:
public void executeCommand(Command command, ExecutionHandlerContext context) { List<byte[]> commandElems = command.getProcessedCommand(); int SET = 1; int NOT_SET = 0; int TIMESTAMP_INDEX = 2; if (commandElems.size() != 3) { command.setResponse( Coder.getErrorResponse( context.getByteBufAllocator(), getArgsError())); return; } RegionProvider regionProvider = context.getRegionProvider(); ByteArrayWrapper wKey = command.getKey(); byte[] timestampByteArray = commandElems.get(TIMESTAMP_INDEX); long timestamp; try { timestamp = Coder.bytesToLong(timestampByteArray); } catch (NumberFormatException e) { command.setResponse( Coder.getErrorResponse(context.getByteBufAllocator(), ERROR_NOT_INTEGER)); return; } if (!timeUnitMillis()) { timestamp = timestamp * millisInSecond; } long currentTimeMillis = System.currentTimeMillis(); if (timestamp <= currentTimeMillis) { int result = NOT_SET; RedisDataType redisDataType = context.getKeyRegistrar().getType(wKey); if (redisDataType != null) { regionProvider.getRegionForType(redisDataType).remove(wKey); result = SET; } command.setResponse( Coder.getIntegerResponse( context.getByteBufAllocator(), result)); return; } long delayMillis = timestamp - currentTimeMillis; boolean expirationSet; if (regionProvider.hasExpiration(wKey)) { expirationSet = regionProvider.modifyExpiration(wKey, delayMillis); } else { expirationSet = regionProvider.setExpiration(wKey, delayMillis); } if (expirationSet) { command.setResponse(Coder.getIntegerResponse(context.getByteBufAllocator(), SET)); } else { command.setResponse(Coder.getIntegerResponse(context.getByteBufAllocator(), NOT_SET)); } }