Package redis.clients.jedis

Examples of redis.clients.jedis.ScanParams


        if (isQueueing() || isPipelined()) {
          throw new UnsupportedOperationException("'ZSCAN' cannot be called in pipeline / transaction mode.");
        }

        ScanParams params = prepareScanParams(options);

        ScanResult<redis.clients.jedis.Tuple> result = jedis.zscan(key, JedisConverters.toBytes(cursorId), params);
        return new ScanIteration<RedisZSetCommands.Tuple>(Long.valueOf(result.getStringCursor()), JedisConverters
            .tuplesToTuples().convert(result.getResult()));
      }
View Full Code Here


        if (isQueueing() || isPipelined()) {
          throw new UnsupportedOperationException("'SSCAN' cannot be called in pipeline / transaction mode.");
        }

        ScanParams params = prepareScanParams(options);

        redis.clients.jedis.ScanResult<byte[]> result = jedis.sscan(key, JedisConverters.toBytes(cursorId), params);
        return new ScanIteration<byte[]>(Long.valueOf(result.getStringCursor()), result.getResult());
      }
    }.open();
View Full Code Here

        if (isQueueing() || isPipelined()) {
          throw new UnsupportedOperationException("'HSCAN' cannot be called in pipeline / transaction mode.");
        }

        ScanParams params = prepareScanParams(options);

        ScanResult<Entry<byte[], byte[]>> result = jedis.hscan(key, JedisConverters.toBytes(cursorId), params);
        return new ScanIteration<Map.Entry<byte[], byte[]>>(Long.valueOf(result.getStringCursor()), result.getResult());
      }
    }.open();
View Full Code Here

      }
    }.open();
  }

  private ScanParams prepareScanParams(ScanOptions options) {
    ScanParams sp = new ScanParams();
    if (!options.equals(ScanOptions.NONE)) {
      if (options.getCount() != null) {
        sp.count(options.getCount().intValue());
      }
      if (StringUtils.hasText(options.getPattern())) {
        sp.match(options.getPattern());
      }
    }
    return sp;
  }
View Full Code Here

TOP

Related Classes of redis.clients.jedis.ScanParams

Copyright © 2018 www.massapicom. 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.