迁移指南
本节包含有关迁移步骤、弃用和删除的详细信息。
从 2.x 升级到 3.x
重新/删除的类型
类型 | 替换 |
---|---|
o.s.d.redis.Version |
o.s.d.util.Version |
o.s.d.redis.VersionParser |
- |
o.s.d.redis.connection.RedisZSetCommands.Aggregate |
o.s.d.redis.connection.zset.Aggregate |
o.s.d.redis.connection.RedisZSetCommands.Tuple |
o.s.d.redis.connection.zset.Tuple |
o.s.d.redis.connection.RedisZSetCommands.Weights |
o.s.d.redis.connection.zset.Weights |
o.s.d.redis.connection.RedisZSetCommands.Range |
o.s.d.domain.Range |
o.s.d.redis.connection.RedisZSetCommands.Limit |
o.s.d.redis.connection.Limit.java |
o.s.d.redis.connection.jedis.JedisUtils |
- |
o.s.d.redis.connection.jedis.JedisVersionUtil |
- |
o.s.d.redis.core.convert.CustomConversions |
o.s.d.convert.CustomConversions |
更改的方法和类型
类型 | 方法 | 替换 |
---|---|---|
o.s.d.redis.core.Cursor |
open |
- |
o.s.d.redis.core.RedisTemplate |
execute |
doWithKeys |
o.s.d.redis.stream.StreamMessageListenerContainer |
isAutoAck |
isAutoAcknowledge |
o.s.d.redis.stream.StreamMessageListenerContainer |
autoAck |
autoAcknowledge |
类型 | 方法 | 替换 |
---|---|---|
o.s.d.redis.connection.ClusterCommandExecutionFailureException |
getCauses |
getSuppressed |
o.s.d.redis.connection.RedisConnection |
bgWriteAof |
bgReWriteAof |
o.s.d.redis.connection.RedisConnection |
slaveOf |
replicaOf |
o.s.d.redis.connection.RedisConnection |
slaveOfNoOne |
replicaOfNoOne |
o.s.d.redis.connection.ReactiveClusterCommands |
clusterGetSlaves |
clusterGetReplicas |
o.s.d.redis.connection.ReactiveClusterCommands |
clusterGetMasterSlaveMap |
clusterGetMasterReplicaMap |
o.s.d.redis.connection.ReactiveKeyCommands |
getNewName |
getNewKey |
o.s.d.redis.connection.RedisClusterNode.Flag |
SLAVE |
REPLICA |
o.s.d.redis.connection.RedisClusterNode.Builder |
slaveOf |
replicaOf |
o.s.d.redis.connection.RedisNode |
isSlave |
isReplica |
o.s.d.redis.connection.RedisSentinelCommands |
slaves |
replicas |
o.s.d.redis.connection.RedisServer |
getNumberSlaves |
getNumberReplicas |
o.s.d.redis.connection.RedisServerCommands |
slaveOf |
replicaOf |
o.s.d.redis.core.ClusterOperations |
getSlaves |
getReplicas |
o.s.d.redis.core.RedisOperations |
slaveOf |
replicaOf |
类型 | 方法 | 替换 |
---|---|---|
o.s.d.redis.core.GeoOperations & BoundGeoOperations |
geoAdd |
add |
o.s.d.redis.core.GeoOperations & BoundGeoOperations |
geoDist |
distance |
o.s.d.redis.core.GeoOperations & BoundGeoOperations |
geoHash |
hash |
o.s.d.redis.core.GeoOperations & BoundGeoOperations |
geoPos |
position |
o.s.d.redis.core.GeoOperations & BoundGeoOperations |
geoRadius |
radius |
o.s.d.redis.core.GeoOperations & BoundGeoOperations |
geoRadiusByMember |
radius |
o.s.d.redis.core.GeoOperations & BoundGeoOperations |
geoRemove |
remove |
类型 | 方法 | 替换 |
---|---|---|
o.s.d.redis.cache.RedisCacheConfiguration |
prefixKeysWith |
prefixCacheNameWith |
o.s.d.redis.cache.RedisCacheConfiguration |
getKeyPrefix |
getKeyPrefixFor |
Jedis
请阅读 Jedis 升级指南,其中涵盖了重要的驱动程序更改。
类型 | 方法 | 替换 |
---|---|---|
o.s.d.redis.connection.jedis.JedisConnectionFactory |
getShardInfo |
可以通过 JedisClientConfiguration 获取 |
o.s.d.redis.connection.jedis.JedisConnectionFactory |
setShardInfo |
可以通过 JedisClientConfiguration 设置 |
o.s.d.redis.connection.jedis.JedisConnectionFactory |
createCluster |
现在需要 |
o.s.d.redis.connection.jedis.JedisConverters |
现在具有包可见性 |
|
o.s.d.redis.connection.jedis.JedisConverters |
tuplesToTuples |
- |
o.s.d.redis.connection.jedis.JedisConverters |
tuplesToTuples |
- |
o.s.d.redis.connection.jedis.JedisConverters |
stringListToByteList |
- |
o.s.d.redis.connection.jedis.JedisConverters |
stringSetToByteSet |
- |
o.s.d.redis.connection.jedis.JedisConverters |
stringMapToByteMap |
- |
o.s.d.redis.connection.jedis.JedisConverters |
tupleSetToTupleSet |
- |
o.s.d.redis.connection.jedis.JedisConverters |
toTupleSet |
- |
o.s.d.redis.connection.jedis.JedisConverters |
toDataAccessException |
o.s.d.redis.connection.jedis.JedisExceptionConverter#convert |