gpt4 book ai didi

redis.clients.jedis.ZParams.getParams()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-14 01:22:49 27 4
gpt4 key购买 nike

本文整理了Java中redis.clients.jedis.ZParams.getParams()方法的一些代码示例,展示了ZParams.getParams()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZParams.getParams()方法的具体详情如下:
包路径:redis.clients.jedis.ZParams
类名称:ZParams
方法名:getParams

ZParams.getParams介绍

暂无

代码示例

代码示例来源:origin: sohutv/cachecloud

public void zinterstore(final byte[] dstkey, final ZParams params, final byte[]... sets) {
 final List<byte[]> args = new ArrayList<byte[]>();
 args.add(dstkey);
 args.add(Protocol.toByteArray(sets.length));
 for (final byte[] set : sets) {
  args.add(set);
 }
 args.addAll(params.getParams());
 sendCommand(ZINTERSTORE, args.toArray(new byte[args.size()][]));
}

代码示例来源:origin: sohutv/cachecloud

public void zunionstore(final byte[] dstkey, final ZParams params, final byte[]... sets) {
 final List<byte[]> args = new ArrayList<byte[]>();
 args.add(dstkey);
 args.add(Protocol.toByteArray(sets.length));
 for (final byte[] set : sets) {
  args.add(set);
 }
 args.addAll(params.getParams());
 sendCommand(ZUNIONSTORE, args.toArray(new byte[args.size()][]));
}

代码示例来源:origin: apache/servicemix-bundles

public void zunionstore(final byte[] dstkey, final ZParams params, final byte[]... sets) {
 final List<byte[]> args = new ArrayList<byte[]>();
 args.add(dstkey);
 args.add(Protocol.toByteArray(sets.length));
 for (final byte[] set : sets) {
  args.add(set);
 }
 args.addAll(params.getParams());
 sendCommand(ZUNIONSTORE, args.toArray(new byte[args.size()][]));
}

代码示例来源:origin: io.leopard/leopard-redis

/**
 * 返回AGGREGATE参数选项.
 * 
 * @param params 参数
 * @return
 */
public static ZParams.Aggregate getAggregate(ZParams params) {
  Collection<byte[]> collect = params.getParams();
  Iterator<byte[]> iterator = collect.iterator();
  String key = new String(iterator.next());
  if (!"aggregate".equals(key)) {
    return ZParams.Aggregate.SUM;
  }
  String type = new String(iterator.next());
  return ZParams.Aggregate.valueOf(type);
}

代码示例来源:origin: apache/servicemix-bundles

public void zinterstore(final byte[] dstkey, final ZParams params, final byte[]... sets) {
 final List<byte[]> args = new ArrayList<byte[]>();
 args.add(dstkey);
 args.add(Protocol.toByteArray(sets.length));
 for (final byte[] set : sets) {
  args.add(set);
 }
 args.addAll(params.getParams());
 sendCommand(ZINTERSTORE, args.toArray(new byte[args.size()][]));
}

代码示例来源:origin: io.leopard/leopard-redis

/**
 * 返回WEIGHTS参数列表.
 * 
 * @param params 参数
 * @return
 */
public static List<Double> getWeights(ZParams params) {
  Collection<byte[]> collect = params.getParams();
  Iterator<byte[]> iterator = collect.iterator();
  boolean hasWeights = false;
  while (iterator.hasNext()) {
    String value = new String(iterator.next());
    // System.out.println("value:" + value);
    if ("weights".equals(value)) {
      hasWeights = true;
      break;
    }
  }
  if (!hasWeights) {
    return null;
  }
  List<Double> result = new ArrayList<Double>();
  while (iterator.hasNext()) {
    String weight = new String(iterator.next());
    result.add(Double.parseDouble(weight));
  }
  return result;
}

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com