diff --git a/src/main/java/in/nosd/redis/dataadapters/RedisLookupDataAdapter.java b/src/main/java/in/nosd/redis/dataadapters/RedisLookupDataAdapter.java index 394a3ec..796e17b 100755 --- a/src/main/java/in/nosd/redis/dataadapters/RedisLookupDataAdapter.java +++ b/src/main/java/in/nosd/redis/dataadapters/RedisLookupDataAdapter.java @@ -147,8 +147,6 @@ public class RedisLookupDataAdapter extends LookupDataAdapter { return LookupResult.empty(); } return LookupResult.single(value); - - //return LookupResult.single("coincoin"); } catch (Exception e) { LOG.error("Redis GET request error for key <{}>", trimmedKey, e); redisGetRequestErrors.mark(); @@ -158,23 +156,27 @@ public class RedisLookupDataAdapter extends LookupDataAdapter { } } + // This is deprecated, see setValue @Override public void set(Object key, Object value) { - //throw new UnsupportedOperationException(); - LOG.warn("Entering Redis set function with {}={}", key.toString(), value.toString()); + return; + } + + @Override + public LookupResult setValue(Object key, Object value) { final Timer.Context time = redisSetRequestTimer.time(); try { final String result = this.commands.set(key.toString(), value.toString()); if (!result.equals("OK")) { LOG.warn("Redis SET key <{}> to value <{}> returned {}", key, value, result); redisSetRequestErrors.mark(); - return; + return LookupResult.empty(); } - return; + return LookupResult.single(value.toString()); } catch (Exception e) { LOG.error("Redis SET key <{}> to value <{}> returned an exception: {}", key, value, e); redisSetRequestErrors.mark(); - return; + return LookupResult.empty(); } finally { time.stop(); }