|
1 | 1 | # Jedis 5 Breaking Changes |
2 | 2 |
|
| 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 | + |
3 | 22 | - Both `bzpopmax(double timeout, String... keys)` and `bzpopmin(double timeout, String... keys)` now return `KeyValue<String, Tuple>` (instead of `KeyedZSetElement`). |
4 | 23 |
|
5 | 24 | - Both `bzpopmax(double timeout, byte[]... keys)` and `bzpopmin(double timeout, byte[]... keys)` now return `KeyValue<byte[], Tuple>` (instead of `List<byte[]>`). |
|
41 | 60 | - `tsMRevRange(TSMRangeParams multiRangeParams)` |
42 | 61 |
|
43 | 62 | - `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. |
45 | 64 | - The returning object will be `List<Double>` when running under RESP3 protocol. |
46 | 65 |
|
47 | 66 | - `getAgeSeconds()` in `AccessControlLogEntry` now returns `Double` instead of `String`. |
|
52 | 71 |
|
53 | 72 | - `graphSlowlog(String graphName)` now returns `List<List<Object>>` (instead of `List<List<String>>`). |
54 | 73 |
|
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. |
56 | 91 |
|
57 | 92 | - Following classes have been removed: |
58 | 93 | - `KeyedZSetElement` |
|
67 | 102 | - `BINARY_MAP_FROM_PAIRS` |
68 | 103 | - `STRING_ORDERED_SET` |
69 | 104 |
|
| 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 | + |
70 | 109 | - Following methods supporting JSON.RESP command have been removed: |
71 | 110 | - `jsonResp(String key)` |
72 | 111 | - `jsonResp(String key, Path path)` |
|
79 | 118 | - `Params` abstract class is removed. |
80 | 119 | - `toString()` support used by its sub-classes is now unavailable. |
81 | 120 |
|
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 | | - |
88 | 121 | - `getParams()` method is removed from `SortingParams` class. |
89 | 122 |
|
90 | 123 | - Both `SEARCH_AGGREGATION_RESULT` and `SEARCH_AGGREGATION_RESULT_WITH_CURSOR` implementations from `SearchBuilderFactory` class have been moved to `AggregationResult` class. |
91 | 124 |
|
92 | 125 | - All `AggregationResult` constructors have been made `private`. |
93 | 126 |
|
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`. |
120 | 128 |
|
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. |
124 | 130 |
|
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. |
127 | 132 |
|
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. |
130 | 134 |
|
131 | | -- `topkCount(String key, String... items)` method has been removed from everywhere. |
| 135 | +- `addObjects(int[] ints)` method has been removed from `CommandArguments`. |
132 | 136 |
|
133 | 137 | - Following methods have been removed: |
134 | 138 | - `strAlgoLCSStrings(String strA, String strB, StrAlgoLCSParams params)` |
135 | 139 | - `strAlgoLCSStrings(byte[] strA, byte[] strB, StrAlgoLCSParams params)` |
136 | 140 | - `strAlgoLCSKeys(String keyA, String keyB, StrAlgoLCSParams params)` |
137 | 141 | - `strAlgoLCSKeys(byte[] keyA, byte[] keyB, StrAlgoLCSParams params)` |
138 | 142 |
|
139 | | -- `StrAlgoLCSParams` has been removed. |
| 143 | +- `StrAlgoLCSParams` class has been removed. |
140 | 144 |
|
141 | 145 | - Following methods have been removed from all Pipeline classes: |
142 | 146 | - `ftCursorRead(String indexName, long cursorId, int count)` |
|
147 | 151 | - `ftAliasUpdate(String aliasName, String indexName)` |
148 | 152 | - `ftAliasDel(String aliasName)` |
149 | 153 |
|
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 | | - |
158 | 154 | - `JedisSentineled(String masterName, Set<HostAndPort> sentinels, JedisClientConfig masterClientConfig, JedisClientConfig sentinelClientConfig)` and |
159 | 155 | `JedisSentineled(String masterName, Set<HostAndPort> sentinels, GenericObjectPoolConfig<Connection> poolConfig, JedisClientConfig masterClientConfig, JedisClientConfig sentinelClientConfig)` |
160 | 156 | constructors have been removed. |
|
0 commit comments