Jedis 5 Breaking Changes
-
All variants of
blmpop
andbzmpop
methods now takedouble timeout
parameter instead oflong timeout
parameter. This is breaking ONLY IF you are usingLong
for timeout. -
Reducer
abstract 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.getName
method is removed.getAlias
method is removed.setAlias
method is removed; useas
method.setAliasAsField
method is removed.getOwnArgs
method is now abstract.-
getArgs
method is removed. -
quit()
method has been removed fromConnection
andServerCommands
interface and implementations. -
updatePassword(String password)
method has been removed fromJedisClientConfig
and implementations. -
setPassword(String password)
method has been removed from bothJedisFactory
andConnectionFactory
classes. -
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 returnsObject
instead 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()
inAccessControlLogEntry
now returnsDouble
instead 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>>
). -
CommandListFilterByParams
now throwsIllegalArgumentException
(instead ofJedisDataException
) in case of unfulfilling filter. -
FailoverParams
now throwsIllegalArgumentException
(instead ofIllegalStateException
) in case of unfulfilling optional arguments. -
XPendingParams
now 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 inStringCommands
interface.-
setGet(byte[] key, byte[] value)
method has been added inStringBinaryCommands
interface. -
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 inTSAlterParams
has been removed. Useretention(long)
method instead. -
Following classes have been removed:
KeyedZSetElement
KeyedListElement
TSKeyValue
TSKeyedElements
-
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)
-
RedisJsonCommands
andRedisJsonPipelineCommands
interfaces have been moved intoredis.clients.jedis.json.commands
package. -
AbortedTransactionException
is removed. -
Queable
class is removed. -
Params
abstract class is removed. -
toString()
support used by its sub-classes is now unavailable. -
getParams()
method is removed fromSortingParams
class. -
Both
SEARCH_AGGREGATION_RESULT
andSEARCH_AGGREGATION_RESULT_WITH_CURSOR
implementations fromSearchBuilderFactory
class have been moved toAggregationResult
class. -
All
AggregationResult
constructors have been madeprivate
. -
getArgs()
,getArgsString()
andserializeRedisArgs(List<byte[]> redisArgs)
methods have been removed fromAggregationBuilder
. -
totalResults
variable inAggregationResult
has been made private. UsegetTotalResults()
method instead. -
getArgs()
andlimit(Limit limit)
methods have been removed fromGroup
class. -
addCommandEncodedArguments
andaddCommandBinaryArguments
methods have been removed fromFieldName
class. -
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)
-
StrAlgoLCSParams
class 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.