Skip to content

Commit 84ab6fd

Browse files
authored
Restore binary compatibility of SetParams (#4225)
1 parent a61a59d commit 84ab6fd

File tree

2 files changed

+61
-1
lines changed

2 files changed

+61
-1
lines changed

src/main/java/redis/clients/jedis/params/BaseSetExParams.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
*
2121
* @param <T> the type of the subclass extending this base class
2222
*/
23-
class BaseSetExParams<T extends BaseSetExParams> implements IParams {
23+
class BaseSetExParams<T extends BaseSetExParams<T>> implements IParams {
2424

2525
private Keyword expiration;
2626
private Long expirationValue;

src/main/java/redis/clients/jedis/params/SetParams.java

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,66 @@ public SetParams xx() {
3131
return this;
3232
}
3333

34+
/**
35+
* Set the specified expire time, in seconds.
36+
* @param remainingSeconds
37+
* @return SetParams
38+
*/
39+
@Override
40+
public SetParams ex(long remainingSeconds) {
41+
return super.ex(remainingSeconds);
42+
}
43+
44+
/**
45+
* Set the specified expire time, in milliseconds.
46+
* @param remainingMilliseconds
47+
* @return SetParams
48+
*/
49+
@Override
50+
public SetParams px(long remainingMilliseconds) {
51+
return super.px(remainingMilliseconds);
52+
}
53+
54+
/**
55+
* Set the specified Unix time at which the key will expire, in seconds.
56+
* @param timestampSeconds
57+
* @return SetParams
58+
*/
59+
@Override
60+
public SetParams exAt(long timestampSeconds) {
61+
return super.exAt(timestampSeconds);
62+
}
63+
64+
/**
65+
* Set the specified Unix time at which the key will expire, in milliseconds.
66+
* @param timestampMilliseconds
67+
* @return SetParams
68+
*/
69+
@Override
70+
public SetParams pxAt(long timestampMilliseconds) {
71+
return super.pxAt(timestampMilliseconds);
72+
}
73+
74+
/**
75+
* Retain the time to live associated with the key.
76+
*
77+
* @deprecated Since 6.1.0 use {@link #keepTtl()} instead.
78+
* @return SetParams
79+
*/
80+
@Override
81+
public SetParams keepttl() {
82+
return keepTtl();
83+
}
84+
85+
/**
86+
* Retain the time to live associated with the key.
87+
* @return SetParams
88+
*/
89+
@Override
90+
public SetParams keepTtl() {
91+
return super.keepTtl();
92+
}
93+
3494
@Override
3595
public void addParams(CommandArguments args) {
3696
if (existance != null) {

0 commit comments

Comments
 (0)