Jedis 5 Breaking Changes
-
All variants of
blmpopandbzmpopmethods now takedouble timeoutparameter instead oflong timeoutparameter. This is breaking ONLY IF you are usingLongfor timeout. -
Reducerabstract class is refactored: Reducer(String field)constructor is removed;Reducer(String name, String field)constructor is added.Reducer(String name)constructor is added; it will cause runtime error with olderReducer(String field)constructor.getNamemethod is removed.getAliasmethod is removed.setAliasmethod is removed; useasmethod.setAliasAsFieldmethod is removed.getOwnArgsmethod is now abstract.-
getArgsmethod is removed. -
quit()method has been removed fromConnectionandServerCommandsinterface and implementations. -
updatePassword(String password)method has been removed fromJedisClientConfigand implementations. -
setPassword(String password)method has been removed from bothJedisFactoryandConnectionFactoryclasses. -
Both
bzpopmax(double timeout, String... keys)andbzpopmin(double timeout, String... keys)now returnKeyValue<String, Tuple>(instead ofKeyedZSetElement). -
Both
bzpopmax(double timeout, byte[]... keys)andbzpopmin(double timeout, byte[]... keys)now returnKeyValue<byte[], Tuple>(instead ofList<byte[]>). -
Following methods now return
KeyValue<String, String>instead ofKeyedListElement: blpop(double timeout, String key)blpop(double timeout, String... keys)brpop(double timeout, String key)-
brpop(double timeout, String... keys) -
Following methods now return
KeyValue<byte[], byte[]>instead ofList<byte[]>: blpop(double timeout, byte[]... keys)-
brpop(double timeout, byte[]... keys) -
zdiff(String... keys)method now returnsList<String>(instead ofSet<String>). zdiff(byte[]... keys)method now returnsList<byte[]>(instead ofSet<byte[]>).-
Both
zdiffWithScores(String... keys)andzdiffWithScores(byte[]... keys)methods now returnList<Tuple>(instead ofSet<Tuple>). -
zinter(ZParams params, String... keys)method now returnsList<String>(instead ofSet<String>). zinter(ZParams params, byte[]... keys)method now returnsList<byte[]>(instead ofSet<byte[]>).-
Both
zinterWithScores(ZParams params, String... keys)andzinterWithScores(ZParams params, byte[]... keys)methods now returnList<Tuple>(instead ofSet<Tuple>). -
zunion(ZParams params, String... keys)method now returnsList<String>(instead ofSet<String>). zunion(ZParams params, byte[]... keys)method now returnsList<byte[]>(instead ofSet<byte[]>).-
Both
zunionWithScores(ZParams params, String... keys)andzunionWithScores(ZParams params, byte[]... keys)methods now returnList<Tuple>(instead ofSet<Tuple>). -
Both
configGet(String pattern)andconfigGet(String... patterns)methods now returnMap<String, String>instead ofList<String>. -
Both
configGet(byte[] pattern)andconfigGet(byte[]... patterns)methods now returnMap<byte[], byte[]>instead ofList<byte[]>. -
New
aclDelUser(String... names)method replacesaclDelUser(String name)andaclDelUser(String name, String... names)methods. -
New
aclDelUser(byte[]... names)method replacesaclDelUser(byte[] name)andaclDelUser(byte[] name, byte[]... names)methods. -
tsMGet(TSMGetParams multiGetParams, String... filters)method now returnsMap<String, TSMGetElement>instead ofList<TSKeyValue<TSElement>>. -
Following methods now return
Map<String, TSMRangeElements>instead ofList<TSKeyedElements>: tsMRange(long fromTimestamp, long toTimestamp, String... filters)tsMRange(TSMRangeParams multiRangeParams)tsMRevRange(long fromTimestamp, long toTimestamp, String... filters)-
tsMRevRange(TSMRangeParams multiRangeParams) -
jsonNumIncrBy(String key, Path2 path, double value)method now returnsObjectinstead ofJSONArray. - The returning object would still be JSONArray for all previous cases. So simple type casting is enough to handle this change.
-
The returning object will be
List<Double>when running under RESP3 protocol. -
getAgeSeconds()inAccessControlLogEntrynow returnsDoubleinstead ofString. -
Both
ftConfigGet(String option)andftConfigGet(String indexName, String option)methods now returnMap<String, Object>instead ofMap<String, String>. -
ftList()method now returnsSet<String>instead ofList<String>. -
graphSlowlog(String graphName)now returnsList<List<Object>>(instead ofList<List<String>>). -
CommandListFilterByParamsnow throwsIllegalArgumentException(instead ofJedisDataException) in case of unfulfilling filter. -
FailoverParamsnow throwsIllegalArgumentException(instead ofIllegalStateException) in case of unfulfilling optional arguments. -
XPendingParamsnow throwsIllegalArgumentException(instead ofIllegalStateException) in case of unfulfilling optional arguments. -
get()option has been removed fromSetParams. Following methods have been added in Jedis/UnifiedJedis for convenience: setGet(String key, String value)method has been added inStringCommandsinterface.-
setGet(byte[] key, byte[] value)method has been added inStringBinaryCommandsinterface. -
xpending(String key, String groupName, StreamEntryID start, StreamEntryID end, int count, String consumerName)method has been removed from everywhere. -
Use
xpending(java.lang.String, java.lang.String, redis.clients.jedis.params.XPendingParams)instead. -
xpending(byte[] key, byte[] groupName, byte[] start, byte[] end, int count, byte[] consumerName)method has been removed from everywhere. -
Use
xpending(byte[], byte[], redis.clients.jedis.params.XPendingParams)instead. -
retentionTime(long retentionTime)method inTSAlterParamshas been removed. Useretention(long)method instead. -
Following classes have been removed:
KeyedZSetElementKeyedListElementTSKeyValueTSKeyedElements-
Limit -
Following BuilderFactory implementations have been removed:
BYTE_ARRAY(useBINARY)BYTE_ARRAY_LIST(useBINARY_LIST)BINARY_MAP_FROM_PAIRS-
STRING_ORDERED_SET -
All payload related parameters are removed from search related classes; namely
Document,IndexDefinition,Query. -
topkCount(String key, String... items)method has been removed from everywhere. -
Following methods supporting JSON.RESP command have been removed:
jsonResp(String key)jsonResp(String key, Path path)-
jsonResp(String key, Path2 path) -
RedisJsonCommandsandRedisJsonPipelineCommandsinterfaces have been moved intoredis.clients.jedis.json.commandspackage. -
AbortedTransactionExceptionis removed. -
Queableclass is removed. -
Paramsabstract class is removed. -
toString()support used by its sub-classes is now unavailable. -
getParams()method is removed fromSortingParamsclass. -
Both
SEARCH_AGGREGATION_RESULTandSEARCH_AGGREGATION_RESULT_WITH_CURSORimplementations fromSearchBuilderFactoryclass have been moved toAggregationResultclass. -
All
AggregationResultconstructors have been madeprivate. -
getArgs(),getArgsString()andserializeRedisArgs(List<byte[]> redisArgs)methods have been removed fromAggregationBuilder. -
totalResultsvariable inAggregationResulthas been made private. UsegetTotalResults()method instead. -
getArgs()andlimit(Limit limit)methods have been removed fromGroupclass. -
addCommandEncodedArgumentsandaddCommandBinaryArgumentsmethods have been removed fromFieldNameclass. -
addObjects(int[] ints)method has been removed fromCommandArguments. -
Following methods have been removed:
strAlgoLCSStrings(String strA, String strB, StrAlgoLCSParams params)strAlgoLCSStrings(byte[] strA, byte[] strB, StrAlgoLCSParams params)strAlgoLCSKeys(String keyA, String keyB, StrAlgoLCSParams params)-
strAlgoLCSKeys(byte[] keyA, byte[] keyB, StrAlgoLCSParams params) -
StrAlgoLCSParamsclass has been removed. -
Following methods have been removed from all Pipeline classes:
ftCursorRead(String indexName, long cursorId, int count)ftCursorDel(String indexName, long cursorId)ftDropIndex(String indexName)ftDropIndexDD(String indexName)ftAliasAdd(String aliasName, String indexName)ftAliasUpdate(String aliasName, String indexName)-
ftAliasDel(String aliasName) -
JedisSentineled(String masterName, Set<HostAndPort> sentinels, JedisClientConfig masterClientConfig, JedisClientConfig sentinelClientConfig)andJedisSentineled(String masterName, Set<HostAndPort> sentinels, GenericObjectPoolConfig<Connection> poolConfig, JedisClientConfig masterClientConfig, JedisClientConfig sentinelClientConfig)constructors have been removed. -
JedisClusterInfoCache(JedisClientConfig clientConfig)andJedisClusterInfoCache(JedisClientConfig clientConfig, GenericObjectPoolConfig<Connection> poolConfig)constructors have been removed.