Exemplo n.º 1
0
 @Test
 public void append() {
   rc.del(a("mykey"));
   eq(5, rc.append("mykey", "Hello"));
   eq(11, rc.append("mykey", " World"));
   eq("Hello World", rc.get("mykey"));
 }
  public byte[] get(byte[] key) {
    try {
      if (isPipelined()) {
        pipeline(pipeline.get(key));
        return null;
      }

      return client.get(key).data();
    } catch (Exception ex) {
      throw convertSrpAccessException(ex);
    }
  }
Exemplo n.º 3
0
 @Test
 public void get() {
   rc.del_("key");
   eq("OK", rc.set("key", "value"));
   eq("value", rc.get("key"));
 }