Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@
* @author Mark Paluch
* @author Ninad Divadkar
* @author Guy Korland
* @author dengliming
*/
public abstract class JedisConverters extends Converters {

Expand Down Expand Up @@ -424,21 +425,7 @@ public static SetParams toSetCommandExPxArgument(Expiration expiration, SetParam
SetParams paramsToUse = params == null ? SetParams.setParams() : params;

if (expiration.isKeepTtl()) {

// TODO: remove once jedis supports KEEPTTL (https://github.com/xetorthio/jedis/issues/2248)
return new SetParams() {

@Override
public byte[][] getByteParams(byte[]... args) {

ArrayList<byte[]> byteParams = new ArrayList<>();
for (byte[] arg : paramsToUse.getByteParams(args)) {
byteParams.add(arg);
}
byteParams.add(SafeEncoder.encode("keepttl"));
return byteParams.toArray(new byte[byteParams.size()][]);
}
};
return paramsToUse.keepttl();
}

if (!expiration.isPersistent()) {
Expand Down Expand Up @@ -700,7 +687,7 @@ public static GeoRadiusParam toGeoRadiusParam(GeoRadiusCommandArgs source) {
/**
* Convert given {@link BitFieldSubCommands} into argument array.
*
* @param bitfieldOperation
* @param source
* @return never {@literal null}.
* @since 1.8
*/
Expand Down