Examples of sadd()


Examples of redis.clients.jedis.Jedis.sadd()

    String classNameRedisKey = getClassNameRedisKey(clazz, configName);
    byte[] uniqueIdKey = getUniqueIdKey(uniqueId);
   
    Jedis jedis = getJedisPool().getResource();
    try {
      jedis.sadd(_allClassesKey, clazz.getName());
      jedis.sadd(classKeyName, configName);
      jedis.hset(classNameRedisKey, "UniqueId", uniqueId.toString());
      jedis.hset(uniqueIdKey, DATA_NAME_AS_BYTES, objectAsBytes);
      jedis.hset(uniqueIdKey, CLASS_NAME_AS_BYTES, clazz.getName().getBytes(Charsets.UTF_8));
      jedis.hset(uniqueIdKey, ITEM_NAME_AS_BYTES, configName.getBytes(Charsets.UTF_8));
View Full Code Here

Examples of redis.clients.jedis.Jedis.sadd()

    byte[] uniqueIdKey = getUniqueIdKey(uniqueId);
   
    Jedis jedis = getJedisPool().getResource();
    try {
      jedis.sadd(_allClassesKey, clazz.getName());
      jedis.sadd(classKeyName, configName);
      jedis.hset(classNameRedisKey, "UniqueId", uniqueId.toString());
      jedis.hset(uniqueIdKey, DATA_NAME_AS_BYTES, objectAsBytes);
      jedis.hset(uniqueIdKey, CLASS_NAME_AS_BYTES, clazz.getName().getBytes(Charsets.UTF_8));
      jedis.hset(uniqueIdKey, ITEM_NAME_AS_BYTES, configName.getBytes(Charsets.UTF_8));
     
View Full Code Here

Examples of redis.clients.jedis.Jedis.sadd()

        // NOTE kirk 2013-06-18 -- The following call is a known performance bottleneck.
        // I spent a full day attempting almost every single way I could imagine to
        // figure out what was going on, before I gave up for the time being.
        // When we're running in a far more realistic way we need to second guess
        // it, but it is a known performance issue on large portfolio loading.
        jedis.sadd(portfolioPositionsKey, uniqueIdStrings);
       
        getJedisPool().returnResource(jedis);
      } catch (Exception e) {
        s_logger.error("Unable to store positions " + positions, e);
        getJedisPool().returnBrokenResource(jedis);
View Full Code Here

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

  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);
  Response<String> getrange = p.getrange("setrange", 1, 3);
  Response<byte[]> getrangeBytes = p.getrange("setrangebytes".getBytes(),
View Full Code Here

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

      String key = buildRedisEntryKey(feed);

      Pipeline pipe = jedis.pipelined();
      pipe.del(key);
      for (String entry : entries) {
        pipe.sadd(key, entry);
      }
      pipe.expire(key, (int) TimeUnit.DAYS.toSeconds(7));
      pipe.sync();
    }
  }
View Full Code Here

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

  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.sadd()

    @Test
    public void multi() {
  Transaction trans = jedis.multi();

  trans.sadd("foo", "a");
  trans.sadd("foo", "b");
  trans.scard("foo");

  List<Object> response = trans.exec();
View Full Code Here

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

    @Test
    public void multi() {
  Transaction trans = jedis.multi();

  trans.sadd("foo", "a");
  trans.sadd("foo", "b");
  trans.scard("foo");

  List<Object> response = trans.exec();

  List<Object> expected = new ArrayList<Object>();
View Full Code Here

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

  assertEquals(expected, response);

  // Binary
  trans = jedis.multi();

  trans.sadd(bfoo, ba);
  trans.sadd(bfoo, bb);
  trans.scard(bfoo);

  response = trans.exec();
View Full Code Here

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

  // Binary
  trans = jedis.multi();

  trans.sadd(bfoo, ba);
  trans.sadd(bfoo, bb);
  trans.scard(bfoo);

  response = trans.exec();

  expected = new ArrayList<Object>();
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.