org.springframework.data.redis.core.ZSetOperations.unionAndStore()方法的使用及代码示例

x33g5p2x  于2022-02-05 转载在 其他  
字(6.3k)|赞(0)|评价(0)|浏览(154)

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

ZSetOperations.unionAndStore介绍

[英]Union sorted sets at key and otherKeys and store result in destination destKey.
[中]联合键和其他键处的排序集,并将结果存储在目标键中。

代码示例

代码示例来源:origin: spring-projects/spring-data-redis

@Override
public Long unionAndStore(Collection<K> otherKeys, K destKey) {
  return ops.unionAndStore(getKey(), otherKeys, destKey);
}

代码示例来源:origin: spring-projects/spring-data-redis

@Override
public Long unionAndStore(Collection<K> otherKeys, K destKey, Aggregate aggregate, Weights weights) {
  return ops.unionAndStore(getKey(), otherKeys, destKey, aggregate, weights);
}

代码示例来源:origin: spring-projects/spring-data-redis

@Override
public Long unionAndStore(K otherKey, K destKey) {
  return ops.unionAndStore(getKey(), otherKey, destKey);
}

代码示例来源:origin: spring-projects/spring-data-redis

@Override
public Long unionAndStore(Collection<K> otherKeys, K destKey, Aggregate aggregate) {
  return ops.unionAndStore(getKey(), otherKeys, destKey, aggregate);
}

代码示例来源:origin: spring-projects/spring-data-redis

/**
 * Union sorted sets at {@code key} and {@code otherKeys} and store result in destination {@code destKey}.
 *
 * @param key must not be {@literal null}.
 * @param otherKeys must not be {@literal null}.
 * @param destKey must not be {@literal null}.
 * @param aggregate must not be {@literal null}.
 * @return {@literal null} when used in pipeline / transaction.
 * @since 2.1
 * @see <a href="http://redis.io/commands/zunionstore">Redis Documentation: ZUNIONSTORE</a>
 */
@Nullable
default Long unionAndStore(K key, Collection<K> otherKeys, K destKey, Aggregate aggregate) {
  return unionAndStore(key, otherKeys, destKey, aggregate, Weights.fromSetCount(1 + otherKeys.size()));
}

代码示例来源:origin: whvcse/EasyWeb

/**
 * @param key
 * @param otherKeys
 * @param destKey
 * @return
 */
public Long zUnionAndStore(String key, Collection<String> otherKeys,
              String destKey) {
  return redisTemplate.opsForZSet()
      .unionAndStore(key, otherKeys, destKey);
}

代码示例来源:origin: whvcse/EasyWeb

/**
 * 获取key和otherKey的并集并存储在destKey中
 *
 * @param key
 * @param otherKey
 * @param destKey
 * @return
 */
public Long zUnionAndStore(String key, String otherKey, String destKey) {
  return redisTemplate.opsForZSet().unionAndStore(key, otherKey, destKey);
}

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

@Override
public Long unionAndStore(Collection<K> otherKeys, K destKey, Aggregate aggregate, Weights weights) {
  return ops.unionAndStore(getKey(), otherKeys, destKey, aggregate, weights);
}

代码示例来源:origin: org.springframework.data/spring-data-redis

@Override
public Long unionAndStore(Collection<K> otherKeys, K destKey, Aggregate aggregate) {
  return ops.unionAndStore(getKey(), otherKeys, destKey, aggregate);
}

代码示例来源:origin: org.springframework.data/spring-data-redis

@Override
public Long unionAndStore(K otherKey, K destKey) {
  return ops.unionAndStore(getKey(), otherKey, destKey);
}

代码示例来源:origin: org.springframework.data/spring-data-redis

@Override
public Long unionAndStore(Collection<K> otherKeys, K destKey) {
  return ops.unionAndStore(getKey(), otherKeys, destKey);
}

代码示例来源:origin: org.springframework.data/spring-data-redis

@Override
public Long unionAndStore(Collection<K> otherKeys, K destKey, Aggregate aggregate, Weights weights) {
  return ops.unionAndStore(getKey(), otherKeys, destKey, aggregate, weights);
}

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

@Override
public Long unionAndStore(Collection<K> otherKeys, K destKey, Aggregate aggregate) {
  return ops.unionAndStore(getKey(), otherKeys, destKey, aggregate);
}

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

@Override
public Long unionAndStore(K otherKey, K destKey) {
  return ops.unionAndStore(getKey(), otherKey, destKey);
}

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

@Override
public Long unionAndStore(Collection<K> otherKeys, K destKey) {
  return ops.unionAndStore(getKey(), otherKeys, destKey);
}

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

/**
 * Union sorted sets at {@code key} and {@code otherKeys} and store result in destination {@code destKey}.
 *
 * @param key must not be {@literal null}.
 * @param otherKeys must not be {@literal null}.
 * @param destKey must not be {@literal null}.
 * @param aggregate must not be {@literal null}.
 * @return {@literal null} when used in pipeline / transaction.
 * @since 2.1
 * @see <a href="http://redis.io/commands/zunionstore">Redis Documentation: ZUNIONSTORE</a>
 */
@Nullable
default Long unionAndStore(K key, Collection<K> otherKeys, K destKey, Aggregate aggregate) {
  return unionAndStore(key, otherKeys, destKey, aggregate, Weights.fromSetCount(1 + otherKeys.size()));
}

代码示例来源:origin: org.springframework.data/spring-data-redis

/**
 * Union sorted sets at {@code key} and {@code otherKeys} and store result in destination {@code destKey}.
 *
 * @param key must not be {@literal null}.
 * @param otherKeys must not be {@literal null}.
 * @param destKey must not be {@literal null}.
 * @param aggregate must not be {@literal null}.
 * @return {@literal null} when used in pipeline / transaction.
 * @since 2.1
 * @see <a href="http://redis.io/commands/zunionstore">Redis Documentation: ZUNIONSTORE</a>
 */
@Nullable
default Long unionAndStore(K key, Collection<K> otherKeys, K destKey, Aggregate aggregate) {
  return unionAndStore(key, otherKeys, destKey, aggregate, Weights.fromSetCount(1 + otherKeys.size()));
}

代码示例来源:origin: okhelperTeam/okhelper-service

keySet.add(oneKey);
redisTemplate.opsForZSet().unionAndStore(zkey_today, keySet, zkey_three_days);
projectIdTop10 = redisTemplate.opsForZSet().rangeWithScores(zkey_three_days, 0, 9);
break;
  keySet.add(oneKey);
redisTemplate.opsForZSet().unionAndStore(zkey_today, keySet, zkey_week);
projectIdTop10 = redisTemplate.opsForZSet().rangeWithScores(zkey_week, 0, 9);
break;
  keySet.add(oneKey);
redisTemplate.opsForZSet().unionAndStore(zkey_today, keySet, zkey_month);
projectIdTop10 = redisTemplate.opsForZSet().rangeWithScores(zkey_month, 0, 9);
break;

代码示例来源:origin: okhelperTeam/okhelper-service

keySet.add(oneKey);
redisTemplate.opsForZSet().unionAndStore(zkey_today, keySet, zkey_three_days);
projectIdTop10 = redisTemplate.opsForZSet().reverseRangeWithScores(zkey_three_days, 0, 9);
break;
  keySet.add(oneKey);
redisTemplate.opsForZSet().unionAndStore(zkey_today, keySet, zkey_week);
projectIdTop10 = redisTemplate.opsForZSet().reverseRangeWithScores(zkey_week, 0, 9);
break;
  keySet.add(oneKey);
redisTemplate.opsForZSet().unionAndStore(zkey_today, keySet, zkey_month);
projectIdTop10 = redisTemplate.opsForZSet().reverseRangeWithScores(zkey_month, 0, 9);
break;

相关文章