title: is there a way to perform get and set atomically in redis?
body: <p>I'm using jedis, and wish to get the result of a key and modify it and then store it back,</p>
  
  <pre><code>String dataToModify = jedis.get(parent_id);
  //some modify  eg:  
  modifiedData = dataToModify + "modify";
  jedis.set(parent_id, modifiedData);
  </code></pre>
  
  <p>but I then realized that if someone else modified data in key <code>parent_id</code>, between this <code>get</code> and <code>set</code>, there will be collision. the <code>watch-multi-exec</code> does not work since I need to get the value of key <code>parent_id</code> during the transaction. Is there any other way to do this atomically? thanks </p>