Examples of hgetAll()


Examples of redis.clients.jedis.Pipeline.hgetAll()

    public void pipelineBinarySafeHashCommands() {
  jedis.hset("key".getBytes(), "f1".getBytes(), "v111".getBytes());
  jedis.hset("key".getBytes(), "f22".getBytes(), "v2222".getBytes());

  Pipeline p = jedis.pipelined();
  Response<Map<byte[], byte[]>> fmap = p.hgetAll("key".getBytes());
  Response<Set<byte[]>> fkeys = p.hkeys("key".getBytes());
  Response<List<byte[]>> fordered = p.hmget("key".getBytes(),
    "f22".getBytes(), "f1".getBytes());
  Response<List<byte[]>> fvals = p.hvals("key".getBytes());
  p.sync();
View Full Code Here

Examples of redis.clients.jedis.Pipeline.hgetAll()

  Map<byte[], byte[]> bh = new HashMap<byte[], byte[]>();
  bh.put(bbar, bcar);
  bh.put(bcar, bbar);
  jedis.hmset(bfoo, bh);
  Pipeline pipeline = jedis.pipelined();
  Response<Map<byte[], byte[]>> bhashResponse = pipeline.hgetAll(bfoo);
  pipeline.sync();
  Map<byte[], byte[]> bhash = bhashResponse.get();

  assertEquals(2, bhash.size());
  assertArrayEquals(bcar, bhash.get(bbar));
View Full Code Here

Examples of redis.clients.jedis.Pipeline.hgetAll()

    Pipeline pipeline = jedis.pipelined();
    //start transaction
    pipeline.multi();
    for (ExternalId identifier : securities) {
      String redisKey = generateRedisKey(identifier.getScheme().getName(), identifier.getValue(), getNormalizationRuleSetId());
      pipeline.hgetAll(redisKey);
    }
    Response<List<Object>> response = pipeline.exec();
    pipeline.sync();
   
    final Iterator<ExternalId> allSecItr = securities.iterator();
View Full Code Here

Examples of redis.clients.jedis.Pipeline.hgetAll()

            }
            final Map<String, String> facets = shard.hgetAll(idx.cat(Seek.INFO)
                    .key());
            Pipeline p = shard.pipelined();
            for (String facetField : facets.keySet()) {
                p.hgetAll(idx.cat(Seek.INFO).cat(facetField).key());
            }
            List<Object> data = p.execute();
            getPool().returnResource(jedis);
            Iterator<Object> iterator = data.iterator();
            for (String facetField : facets.keySet()) {
View Full Code Here

Examples of redis.clients.jedis.Pipeline.hgetAll()

        try {
            Pipeline p = shard.pipelined();
            // List<String> indexes =
            p.lrange(idx.key(), 0, -1);
            // Map<String, String> fields =
            p.hgetAll(idx.cat(Seek.FIELDS).key());
            // List<String> tags =
            p.lrange(idx.cat(Seek.TAGS).key(), 0, -1);
            List<Object> data = p.execute();
            List<byte[]> indexes = (List<byte[]>) data.get(0);
            List<byte[]> fields = (List<byte[]>) data.get(1);
View Full Code Here

Examples of redis.clients.jedis.ShardedJedis.hgetAll()

 
  private long dirSize() throws IOException {
    long ret = 0;
   
    ShardedJedis rds = redisPool.getResource();
    Map<byte[], byte[]> lst = rds.hgetAll(getDirNameBytes());
    if( lst == null || lst.size() < 1)
      return 0;
    for(byte[] sz: lst.values() ){
      try{ ret += ByteBuffer.wrap(sz).asLongBuffer().get(); }catch(Exception e){}
    }
View Full Code Here

Examples of redis.clients.jedis.ShardedJedisPipeline.hgetAll()

  Response<Boolean> blist = p.exists("list");
  Response<Double> zincrby = p.zincrby("zset", 1, "foo");
  Response<Long> zcard = p.zcard("zset");
  p.lpush("list", "bar");
  Response<List<String>> lrange = p.lrange("list", 0, -1);
  Response<Map<String, String>> hgetAll = p.hgetAll("hash");
  p.sadd("set", "foo");
  Response<Set<String>> smembers = p.smembers("set");
  Response<Set<Tuple>> zrangeWithScores = p.zrangeWithScores("zset", 0,
    -1);
  p.sync();
View Full Code Here

Examples of redis.clients.jedis.Transaction.hgetAll()

        Set<String> statusIds = conn.zrevrange(
            "home:" + uid, (page - 1) * count, page * count - 1);

        Transaction trans = conn.multi();
        for (String id : statusIds) {
            trans.hgetAll("status:" + id);
        }

        List<Map<String,String>> statuses = new ArrayList<Map<String,String>>();
        for (Object result : trans.exec()) {
            Map<String,String> status = (Map<String,String>)result;
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.