Tabnine Logo
RedisZSetCommands$Tuple.getScore
Code IndexAdd Tabnine to your IDE (free)

How to use
getScore
method
in
org.springframework.data.redis.connection.RedisZSetCommands$Tuple

Best Java code snippets using org.springframework.data.redis.connection.RedisZSetCommands$Tuple.getScore (Showing top 20 results out of 315)

origin: redisson/redisson

@Override
public Long zAdd(byte[] key, Set<Tuple> tuples) {
  List<Object> params = new ArrayList<Object>(tuples.size()*2+1);
  params.add(key);
  for (Tuple entry : tuples) {
    params.add(BigDecimal.valueOf(entry.getScore()).toPlainString());
    params.add(entry.getValue());
  }
  return write(key, StringCodec.INSTANCE, RedisCommands.ZADD, params.toArray());
}
origin: redisson/redisson

@Override
public Long zAdd(byte[] key, Set<Tuple> tuples) {
  List<Object> params = new ArrayList<Object>(tuples.size()*2+1);
  params.add(key);
  for (Tuple entry : tuples) {
    params.add(BigDecimal.valueOf(entry.getScore()).toPlainString());
    params.add(entry.getValue());
  }
  return write(key, StringCodec.INSTANCE, RedisCommands.ZADD, params.toArray());
}
origin: redisson/redisson

@Override
public Long zAdd(byte[] key, Set<Tuple> tuples) {
  List<Object> params = new ArrayList<Object>(tuples.size()*2+1);
  params.add(key);
  for (Tuple entry : tuples) {
    params.add(BigDecimal.valueOf(entry.getScore()).toPlainString());
    params.add(entry.getValue());
  }
  return write(key, StringCodec.INSTANCE, RedisCommands.ZADD, params.toArray());
}
origin: apache/servicemix-bundles

/**
 * Constructs a new <code>DefaultStringTuple</code> instance.
 *
 * @param tuple
 * @param valueAsString
 */
public DefaultStringTuple(Tuple tuple, String valueAsString) {
  super(tuple.getValue(), tuple.getScore());
  this.valueAsString = valueAsString;
}
origin: apache/servicemix-bundles

@SuppressWarnings({ "unchecked", "rawtypes" })
private Set<TypedTuple<V>> convertTupleValues(Set<Tuple> rawValues, @Nullable RedisSerializer valueSerializer) {
  Set<TypedTuple<V>> set = new LinkedHashSet<>(rawValues.size());
  for (Tuple rawValue : rawValues) {
    Object value = rawValue.getValue();
    if (valueSerializer != null) {
      value = valueSerializer.deserialize(rawValue.getValue());
    }
    set.add(new DefaultTypedTuple(value, rawValue.getScore()));
  }
  return set;
}
origin: apache/servicemix-bundles

public static List<Object> toObjects(Set<Tuple> tuples) {
  List<Object> tupleArgs = new ArrayList<>(tuples.size() * 2);
  for (Tuple tuple : tuples) {
    tupleArgs.add(tuple.getScore());
    tupleArgs.add(tuple.getValue());
  }
  return tupleArgs;
}
origin: org.springframework.data/spring-data-redis

  private TypedTuple<V> readTypedTuple(Tuple raw) {
    return new DefaultTypedTuple<>(readValue(ByteBuffer.wrap(raw.getValue())), raw.getScore());
  }
}
origin: apache/servicemix-bundles

  private TypedTuple<V> readTypedTuple(Tuple raw) {
    return new DefaultTypedTuple<>(readValue(ByteBuffer.wrap(raw.getValue())), raw.getScore());
  }
}
origin: org.springframework.data/spring-data-redis

public static List<Object> toObjects(Set<Tuple> tuples) {
  List<Object> tupleArgs = new ArrayList<>(tuples.size() * 2);
  for (Tuple tuple : tuples) {
    tupleArgs.add(tuple.getScore());
    tupleArgs.add(tuple.getValue());
  }
  return tupleArgs;
}
origin: org.springframework.data/spring-data-redis

/**
 * Constructs a new <code>DefaultStringTuple</code> instance.
 *
 * @param tuple
 * @param valueAsString
 */
public DefaultStringTuple(Tuple tuple, String valueAsString) {
  super(tuple.getValue(), tuple.getScore());
  this.valueAsString = valueAsString;
}
origin: org.springframework.data/spring-data-redis

@SuppressWarnings({ "unchecked", "rawtypes" })
private Set<TypedTuple<V>> convertTupleValues(Set<Tuple> rawValues, @Nullable RedisSerializer valueSerializer) {
  Set<TypedTuple<V>> set = new LinkedHashSet<>(rawValues.size());
  for (Tuple rawValue : rawValues) {
    Object value = rawValue.getValue();
    if (valueSerializer != null) {
      value = valueSerializer.deserialize(rawValue.getValue());
    }
    set.add(new DefaultTypedTuple(value, rawValue.getScore()));
  }
  return set;
}
origin: org.springframework.data/spring-data-redis

@SuppressWarnings({ "unchecked", "rawtypes" })
TypedTuple<V> deserializeTuple(Tuple tuple) {
  Object value = tuple.getValue();
  if (valueSerializer() != null) {
    value = valueSerializer().deserialize(tuple.getValue());
  }
  return new DefaultTypedTuple(value, tuple.getScore());
}
origin: spring-projects/spring-data-redis

return cmd.zaddincr(command.getKey(), tuple.getScore(), ByteBuffer.wrap(tuple.getValue()))
    .map(value -> new NumericResponse<>(command, value));
.map(tuple -> ScoredValue.fromNullable(tuple.getScore(), ByteBuffer.wrap(tuple.getValue())))
.toArray(ScoredValue[]::new);
origin: spring-projects/spring-data-redis

/**
 * Map a {@link Set} of {@link Tuple} by {@code value} to its {@code score}.
 *
 * @param tuples must not be {@literal null}.
 * @return
 * @since 2.0
 */
public static Map<byte[], Double> toTupleMap(Set<Tuple> tuples) {
  Assert.notNull(tuples, "Tuple set must not be null!");
  Map<byte[], Double> args = new LinkedHashMap<>(tuples.size(), 1);
  Set<Double> scores = new HashSet<>(tuples.size(), 1);
  boolean isAtLeastJedis24 = JedisVersionUtil.atLeastJedis24();
  for (Tuple tuple : tuples) {
    if (!isAtLeastJedis24) {
      if (scores.contains(tuple.getScore())) {
        throw new UnsupportedOperationException(
            "Bulk add of multiple elements with the same score is not supported. Add the elements individually.");
      }
      scores.add(tuple.getScore());
    }
    args.put(tuple.getValue(), tuple.getScore());
  }
  return args;
}
origin: spring-projects/spring-data-redis

@SuppressWarnings({ "unchecked", "rawtypes" })
TypedTuple<V> deserializeTuple(Tuple tuple) {
  Object value = tuple.getValue();
  if (valueSerializer() != null) {
    value = valueSerializer().deserialize(tuple.getValue());
  }
  return new DefaultTypedTuple(value, tuple.getScore());
}
origin: spring-projects/spring-data-redis

/**
 * Constructs a new <code>DefaultStringTuple</code> instance.
 *
 * @param tuple
 * @param valueAsString
 */
public DefaultStringTuple(Tuple tuple, String valueAsString) {
  super(tuple.getValue(), tuple.getScore());
  this.valueAsString = valueAsString;
}
origin: spring-projects/spring-data-redis

public static List<Object> toObjects(Set<Tuple> tuples) {
  List<Object> tupleArgs = new ArrayList<>(tuples.size() * 2);
  for (Tuple tuple : tuples) {
    tupleArgs.add(tuple.getScore());
    tupleArgs.add(tuple.getValue());
  }
  return tupleArgs;
}
origin: spring-projects/spring-data-redis

  private TypedTuple<V> readTypedTuple(Tuple raw) {
    return new DefaultTypedTuple<>(readValue(ByteBuffer.wrap(raw.getValue())), raw.getScore());
  }
}
origin: spring-projects/spring-data-redis

@SuppressWarnings({ "unchecked", "rawtypes" })
private Set<TypedTuple<V>> convertTupleValues(Set<Tuple> rawValues, @Nullable RedisSerializer valueSerializer) {
  Set<TypedTuple<V>> set = new LinkedHashSet<>(rawValues.size());
  for (Tuple rawValue : rawValues) {
    Object value = rawValue.getValue();
    if (valueSerializer != null) {
      value = valueSerializer.deserialize(rawValue.getValue());
    }
    set.add(new DefaultTypedTuple(value, rawValue.getScore()));
  }
  return set;
}
origin: redisson/redisson

@Override
public Long zAdd(byte[] key, Set<Tuple> tuples) {
  List<Object> params = new ArrayList<Object>(tuples.size()*2+1);
  params.add(key);
  for (Tuple entry : tuples) {
    params.add(BigDecimal.valueOf(entry.getScore()).toPlainString());
    params.add(entry.getValue());
  }
  return write(key, StringCodec.INSTANCE, RedisCommands.ZADD, params.toArray());
}
org.springframework.data.redis.connectionRedisZSetCommands$TuplegetScore

Popular methods of RedisZSetCommands$Tuple

  • getValue

Popular in Java

  • Making http requests using okhttp
  • addToBackStack (FragmentTransaction)
  • onRequestPermissionsResult (Fragment)
  • setScale (BigDecimal)
  • URL (java.net)
    A Uniform Resource Locator that identifies the location of an Internet resource as specified by RFC
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • HashMap (java.util)
    HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
  • Executors (java.util.concurrent)
    Factory and utility methods for Executor, ExecutorService, ScheduledExecutorService, ThreadFactory,
  • JCheckBox (javax.swing)
  • JList (javax.swing)
  • CodeWhisperer alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now