Skip to content

Commit 7af02d5

Browse files
authored
Refactor Jedis 5 breaking changes list
1 parent bbba9bf commit 7af02d5

File tree

1 file changed

+47
-51
lines changed

1 file changed

+47
-51
lines changed

docs/breaking-5.md

Lines changed: 47 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,24 @@
11
# Jedis 5 Breaking Changes
22

3+
- All variants of `blmpop` and `bzmpop` methods now take `double timeout` parameter instead of `long timeout` parameter.
4+
This is breaking ONLY IF you are using `Long` for timeout.
5+
6+
- `Reducer` abstract class is refactored:
7+
- **`Reducer(String field)` constructor is removed; `Reducer(String name, String field)` constructor is added.**
8+
- **`Reducer(String name)` constructor is added; it will cause runtime error with older `Reducer(String field)` constructor.**
9+
- `getName` method is removed.
10+
- `getAlias` method is removed.
11+
- `setAlias` method is removed; use `as` method.
12+
- `setAliasAsField` method is removed.
13+
- `getOwnArgs` method is now abstract.
14+
- `getArgs` method is removed.
15+
16+
- `quit()` method has been removed from `Connection` and `ServerCommands` interface and implementations.
17+
18+
- `updatePassword(String password)` method has been removed from `JedisClientConfig` and implementations.
19+
20+
- `setPassword(String password)` method has been removed from both `JedisFactory` and `ConnectionFactory` classes.
21+
322
- Both `bzpopmax(double timeout, String... keys)` and `bzpopmin(double timeout, String... keys)` now return `KeyValue<String, Tuple>` (instead of `KeyedZSetElement`).
423

524
- Both `bzpopmax(double timeout, byte[]... keys)` and `bzpopmin(double timeout, byte[]... keys)` now return `KeyValue<byte[], Tuple>` (instead of `List<byte[]>`).
@@ -41,7 +60,7 @@
4160
- `tsMRevRange(TSMRangeParams multiRangeParams)`
4261

4362
- `jsonNumIncrBy(String key, Path2 path, double value)` method now returns `Object` instead of `JSONArray`.
44-
- Previously when it was returning JSONArray, returned would still be JSONArray. So simple type casting should be enough to handle this change.
63+
- The returning object would still be JSONArray for all previous cases. So simple type casting is enough to handle this change.
4564
- The returning object will be `List<Double>` when running under RESP3 protocol.
4665

4766
- `getAgeSeconds()` in `AccessControlLogEntry` now returns `Double` instead of `String`.
@@ -52,7 +71,23 @@
5271

5372
- `graphSlowlog(String graphName)` now returns `List<List<Object>>` (instead of `List<List<String>>`).
5473

55-
- All _payload_ related parameters are removed from _search_ related classes; namely `Document`, `IndexDefinition`, `Query`.
74+
- `CommandListFilterByParams` now throws `IllegalArgumentException` (instead of `JedisDataException`) in case of unfulfilling filter.
75+
76+
- `FailoverParams` now throws `IllegalArgumentException` (instead of `IllegalStateException`) in case of unfulfilling optional arguments.
77+
78+
- `XPendingParams` now throws `IllegalArgumentException` (instead of `IllegalStateException`) in case of unfulfilling optional arguments.
79+
80+
- `get()` option has been removed from `SetParams`. Following methods have been added in Jedis/UnifiedJedis for convenience:
81+
- `setGet(String key, String value)` method has been added in `StringCommands` interface.
82+
- `setGet(byte[] key, byte[] value)` method has been added in `StringBinaryCommands` interface.
83+
84+
- `xpending(String key, String groupName, StreamEntryID start, StreamEntryID end, int count, String consumerName)` method has been removed from everywhere.
85+
- Use `xpending(java.lang.String, java.lang.String, redis.clients.jedis.params.XPendingParams)` instead.
86+
87+
- `xpending(byte[] key, byte[] groupName, byte[] start, byte[] end, int count, byte[] consumerName)` method has been removed from everywhere.
88+
- Use `xpending(byte[], byte[], redis.clients.jedis.params.XPendingParams)` instead.
89+
90+
- `retentionTime(long retentionTime)` method in `TSAlterParams` has been removed. Use `retention(long)` method instead.
5691

5792
- Following classes have been removed:
5893
- `KeyedZSetElement`
@@ -67,6 +102,10 @@
67102
- `BINARY_MAP_FROM_PAIRS`
68103
- `STRING_ORDERED_SET`
69104

105+
- All _payload_ related parameters are removed from _search_ related classes; namely `Document`, `IndexDefinition`, `Query`.
106+
107+
- `topkCount(String key, String... items)` method has been removed from everywhere.
108+
70109
- Following methods supporting JSON.RESP command have been removed:
71110
- `jsonResp(String key)`
72111
- `jsonResp(String key, Path path)`
@@ -79,64 +118,29 @@
79118
- `Params` abstract class is removed.
80119
- `toString()` support used by its sub-classes is now unavailable.
81120

82-
- `CommandListFilterByParams` now throws `IllegalArgumentException` (instead of `JedisDataException`) in case of unfulfilling filter.
83-
84-
- `FailoverParams` now throws `IllegalArgumentException` (instead of `IllegalStateException`) in case of unfulfilling optional arguments.
85-
86-
- `XPendingParams` now throws `IllegalArgumentException` (instead of `IllegalStateException`) in case of unfulfilling optional arguments.
87-
88121
- `getParams()` method is removed from `SortingParams` class.
89122

90123
- Both `SEARCH_AGGREGATION_RESULT` and `SEARCH_AGGREGATION_RESULT_WITH_CURSOR` implementations from `SearchBuilderFactory` class have been moved to `AggregationResult` class.
91124

92125
- All `AggregationResult` constructors have been made `private`.
93126

94-
- `addCommandEncodedArguments` and `addCommandBinaryArguments` methods have been removed from `FieldName` class.
95-
96-
- `getArgs` method is removed from `AggregationBuilder` class.
97-
98-
- `limit` and `getArgs` methods have been removed from `Group` class.
99-
100-
- `Reducer` abstract class is refactored:
101-
- `Reducer(String field)` constructor is removed; `Reducer(String name, String field)` constructor is added.
102-
- `Reducer(String name)` constructor is added; it will cause runtime error with older `Reducer(String field)` constructor.
103-
- `getName` method is removed.
104-
- `getAlias` method is removed.
105-
- `setAlias` method is removed; use `as` method.
106-
- `setAliasAsField` method is removed.
107-
- `getOwnArgs` method is now abstract.
108-
- `getArgs` method is removed.
109-
110-
- All variants of `blmpop` and `bzmpop` methods now take `double timeout` parameter instead of `long timeout` parameter.
111-
This is breaking ONLY IF you are using `Long` for timeout.
112-
113-
<!--- Deprecated in Jedis 4 --->
114-
115-
- `quit()` method has been removed from `Connection` and `ServerCommands` interface and implementations.
116-
117-
- `updatePassword(String password)` method has been removed from `JedisClientConfig` and implementations.
118-
119-
- `setPassword(String password)` method has been removed from both `JedisFactory` and `ConnectionFactory` classes.
127+
- `getArgs()`, `getArgsString()` and `serializeRedisArgs(List<byte[]> redisArgs)` methods have been removed from `AggregationBuilder`.
120128

121-
- `get()` option has been removed from `SetParams`. Following methods have been added in Jedis/UnifiedJedis for convenience:
122-
- `setGet(String key, String value)` method has been added in `StringCommands` interface.
123-
- `setGet(byte[] key, byte[] value)` method has been added in `StringBinaryCommands` interface.
129+
- `totalResults` variable in `AggregationResult` has been made private. Use `getTotalResults()` method instead.
124130

125-
- `xpending(String key, String groupName, StreamEntryID start, StreamEntryID end, int count, String consumerName)` method has been removed from everywhere.
126-
- Use `xpending(java.lang.String, java.lang.String, redis.clients.jedis.params.XPendingParams)` instead.
131+
- `getArgs()` and `limit(Limit limit)` methods have been removed from `Group` class.
127132

128-
- `xpending(byte[] key, byte[] groupName, byte[] start, byte[] end, int count, byte[] consumerName)` method has been removed from everywhere.
129-
- Use `xpending(byte[], byte[], redis.clients.jedis.params.XPendingParams)` instead.
133+
- `addCommandEncodedArguments` and `addCommandBinaryArguments` methods have been removed from `FieldName` class.
130134

131-
- `topkCount(String key, String... items)` method has been removed from everywhere.
135+
- `addObjects(int[] ints)` method has been removed from `CommandArguments`.
132136

133137
- Following methods have been removed:
134138
- `strAlgoLCSStrings(String strA, String strB, StrAlgoLCSParams params)`
135139
- `strAlgoLCSStrings(byte[] strA, byte[] strB, StrAlgoLCSParams params)`
136140
- `strAlgoLCSKeys(String keyA, String keyB, StrAlgoLCSParams params)`
137141
- `strAlgoLCSKeys(byte[] keyA, byte[] keyB, StrAlgoLCSParams params)`
138142

139-
- `StrAlgoLCSParams` has been removed.
143+
- `StrAlgoLCSParams` class has been removed.
140144

141145
- Following methods have been removed from all Pipeline classes:
142146
- `ftCursorRead(String indexName, long cursorId, int count)`
@@ -147,14 +151,6 @@
147151
- `ftAliasUpdate(String aliasName, String indexName)`
148152
- `ftAliasDel(String aliasName)`
149153

150-
- `addObjects(int[] ints)` method has been removed from `CommandArguments`.
151-
152-
- `getArgsString()` and `serializeRedisArgs(List<byte[]> redisArgs)` methods have been removed from `AggregationBuilder`.
153-
154-
- `totalResults` variable in `AggregationResult` has been made private. Use `getTotalResults()` method instead.
155-
156-
- `retentionTime(long retentionTime)` method in `TSAlterParams` has been removed. Use `retention(long)` method instead.
157-
158154
- `JedisSentineled(String masterName, Set<HostAndPort> sentinels, JedisClientConfig masterClientConfig, JedisClientConfig sentinelClientConfig)` and
159155
`JedisSentineled(String masterName, Set<HostAndPort> sentinels, GenericObjectPoolConfig<Connection> poolConfig, JedisClientConfig masterClientConfig, JedisClientConfig sentinelClientConfig)`
160156
constructors have been removed.

0 commit comments

Comments
 (0)