Examples of scard()


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

    @Override
    public int getTotalRequestsCount(Task task) {
        Jedis jedis = pool.getResource();
        try {
            Long size = jedis.scard(getQueueKey(task));
            return size.intValue();
        } finally {
            pool.returnResource(jedis);
        }
    }
View Full Code Here

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

       
        for (ExternalId externalId : security.getExternalIdBundle()) {
          String redisKey = toRedisKey(externalId);
         
          jedis.sadd(redisKey, uniqueId.toString());
          if (jedis.scard(redisKey) > 1) {
            s_logger.warn("Multiple securities with same ExternalId {}. Probable misuse.", externalId);
          }
        }
       
        byte[] redisKey = toRedisKey(uniqueId);
View Full Code Here

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

    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>();
  expected.add(1L);
View Full Code Here

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

  // Binary
  trans = jedis.multi();

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

  response = trans.exec();

  expected = new ArrayList<Object>();
  expected.add(1L);
View Full Code Here

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

        String by = "kb:doc:*->" + sort;

        String id = parseAndSearch(conn, queryString, 300);

        Transaction trans = conn.multi();
        trans.scard("idx:" + id);
        SortingParams params = new SortingParams();
        if (desc) {
            params.desc();
        }
        if (alpha){
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.