Examples of asStringList()


Examples of redis.reply.MultiBulkReply.asStringList()

    redisClient.hset("hash", "field1", "value1");
    redisClient.hset("hash", "field2", "value2");
    redisClient.hset("hash", "field3", "value1");
    MultiBulkReply hash = redisClient.hgetall("hash");
    assertEquals("value2", hash.asStringMap(Charsets.UTF_8).get("field2"));
    assertEquals(6, hash.asStringList(Charsets.UTF_8).size());
    assertEquals(5, hash.asStringSet(Charsets.UTF_8).size());

    Object[] keys = {"test1", "test2", "test3"};
    redisClient.del(keys);
    redisClient.set("test1", "value1");
View Full Code Here

Examples of redis.reply.MultiBulkReply.asStringList()

    redisClient.del(keys);
    redisClient.set("test1", "value1");
    redisClient.set("test2", "value2");
    redisClient.set("test3", "value3");
    MultiBulkReply values = redisClient.mget(keys);
    List<String> strings = values.asStringList(Charsets.UTF_8);
    assertEquals(3, strings.size());
    assertEquals("value2", strings.get(1));
  }

  @Test
View Full Code Here

Examples of redis.reply.MultiBulkReply.asStringList()

  public List scriptExists(String... scripts) {
    Reply reply = client.script_exists(scripts);
    if (reply instanceof MultiBulkReply) {
      MultiBulkReply mbr = (MultiBulkReply) reply;
      return mbr.asStringList(Charsets.UTF_8);
    }
    return new ArrayList();
  }

  @Test
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.