Class LettuceConverters
java.lang.Object
org.springframework.data.redis.connection.convert.Converters
org.springframework.data.redis.connection.lettuce.LettuceConverters
Lettuce type converters
- Author:
- Jennifer Hickey, Christoph Strobl, Thomas Darimont, Mark Paluch, Ninad Divadkar, dengliming, Chris Bono, Vikas Garg, John Blum, Roman Osadchuk
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final byte[]static final byte[]static final byte[]static final byte[] -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Converter<Set<byte[]>,org.springframework.data.geo.GeoResults<RedisGeoCommands.GeoLocation<byte[]>>> static org.springframework.data.geo.PointgeoCoordinatesToPoint(io.lettuce.core.GeoCoordinates geoCoordinate) static Converter<List<io.lettuce.core.GeoWithin<byte[]>>,org.springframework.data.geo.GeoResults<RedisGeoCommands.GeoLocation<byte[]>>> geoRadiusResponseToGeoResultsConverter(org.springframework.data.geo.Metric metric) static List<RedisClusterNode>partitionsToClusterNodes(io.lettuce.core.cluster.models.partitions.Partitions source) static io.lettuce.core.RedisURIsentinelConfigurationToRedisURI(RedisSentinelConfiguration sentinelConfiguration) static Converter<String,List<RedisClientInfo>> static io.lettuce.core.BitFieldArgstoBitFieldArgs(BitFieldSubCommands subCommands) ConvertBitFieldSubCommandsintoBitFieldArgs.static booleantoBoolean(long value) static booleanstatic byte[]static byte[]static byte[]static byte[]static List<byte[]>toBytesList(io.lettuce.core.KeyValue<byte[], byte[]> source) static List<byte[]>toBytesList(Collection<byte[]> source) static Set<byte[]>toBytesSet(List<byte[]> source) static io.lettuce.core.GeoArgsConvertRedisGeoCommands.GeoCommandArgsintoGeoArgs.static io.lettuce.core.GeoArgsConvertRedisGeoCommands.GeoRadiusCommandArgsintoGeoArgs.static io.lettuce.core.GeoArgs.UnittoGeoArgsUnit(org.springframework.data.geo.Metric metric) ConvertMetricintoGeoArgs.Unit.static inttoInt(boolean value) static io.lettuce.core.LimitConvert aLimitto a LettuceLimit.static List<RedisClientInfo>toListOfRedisClientInformation(String clientList) static List<RedisServer>toListOfRedisServer(List<Map<String, String>> source) static Longstatic Map<byte[],byte[]> static <T> io.lettuce.core.Range<T>toRange(org.springframework.data.domain.Range<T> range) Convert aRedisZSetCommands.Rangeto a lettuceRange.static <T> io.lettuce.core.Range<T>toRange(org.springframework.data.domain.Range<T> range, boolean convertNumberToBytes) Convert aRangeto a lettuceRange.static RedisClusterNodetoRedisClusterNode(io.lettuce.core.cluster.models.partitions.RedisClusterNode source) static <T> io.lettuce.core.Range<T>toRevRange(org.springframework.data.domain.Range<T> range) Convert aRangeto a lettuceRangeand reverse boundaries.static io.lettuce.core.ScriptOutputTypetoScriptOutputType(ReturnType returnType) static io.lettuce.core.SetArgstoSetArgs(Expiration expiration, RedisStringCommands.SetOption option) static io.lettuce.core.SortArgstoSortArgs(SortParameters params) static StringtoString(byte[] source) static TupletoTuple(io.lettuce.core.ScoredValue<byte[]> source) Methods inherited from class org.springframework.data.redis.connection.convert.Converters
deserializingGeoResultsConverter, distanceConverterForMetric, entryOf, identityConverter, listToPropertiesConverter, longToBoolean, mapToPropertiesConverter, millisecondsToTimeUnit, millisecondsToTimeUnit, parse, parse, secondsToDuration, secondsToTimeUnit, secondsToTimeUnit, stringToBoolean, stringToBooleanConverter, stringToDataType, stringToProps, toBit, toBoolean, toClusterNode, toDataType, toObjects, toProperties, toProperties, toProperties, toSetOfRedisClusterNodes, toSetOfRedisClusterNodes, toTimeMillis, toTimeMillis
-
Field Details
-
PLUS_BYTES
public static final byte[] PLUS_BYTES -
MINUS_BYTES
public static final byte[] MINUS_BYTES -
POSITIVE_INFINITY_BYTES
public static final byte[] POSITIVE_INFINITY_BYTES -
NEGATIVE_INFINITY_BYTES
public static final byte[] NEGATIVE_INFINITY_BYTES
-
-
Constructor Details
-
LettuceConverters
public LettuceConverters()
-
-
Method Details
-
geoCoordinatesToPoint
public static org.springframework.data.geo.Point geoCoordinatesToPoint(@Nullable io.lettuce.core.GeoCoordinates geoCoordinate) -
stringToRedisClientListConverter
-
scoredValuesToTupleList
-
toBoolean
public static boolean toBoolean(long value) -
longToBooleanConverter
- Since:
- 1.3
-
toLong
-
toBytesSet
-
toBytesList
-
toBytesList
-
toTuple
-
toString
-
toScriptOutputType
-
toBoolean
-
toInt
public static int toInt(boolean value) -
toMap
-
toSortArgs
-
toListOfRedisClientInformation
-
toLimit
Convert aLimitto a LettuceLimit.- Returns:
- a lettuce
Limit. - Since:
- 2.0
-
toRange
public static <T> io.lettuce.core.Range<T> toRange(org.springframework.data.domain.Range<T> range) Convert aRedisZSetCommands.Rangeto a lettuceRange.- Since:
- 2.0
-
toRange
public static <T> io.lettuce.core.Range<T> toRange(org.springframework.data.domain.Range<T> range, boolean convertNumberToBytes) Convert aRangeto a lettuceRange.- Since:
- 2.2
-
toRevRange
public static <T> io.lettuce.core.Range<T> toRevRange(org.springframework.data.domain.Range<T> range) Convert aRangeto a lettuceRangeand reverse boundaries.- Since:
- 2.0
-
toListOfRedisServer
- Parameters:
source- List of Maps containing node details from SENTINEL REPLICAS or SENTINEL MASTERS. May be empty or null.- Returns:
- List of
RedisServer's. List is empty if List of Maps is empty. - Since:
- 1.5
-
sentinelConfigurationToRedisURI
public static io.lettuce.core.RedisURI sentinelConfigurationToRedisURI(RedisSentinelConfiguration sentinelConfiguration) - Parameters:
sentinelConfiguration- the sentinel configuration containing one or more sentinels and a master name. Must not be null- Returns:
- A
RedisURIcontaining Redis Sentinel addresses ofRedisSentinelConfiguration - Since:
- 1.5
-
toBytes
-
toBytes
-
toBytes
-
toBytes
- Since:
- 1.6
-
partitionsToClusterNodes
public static List<RedisClusterNode> partitionsToClusterNodes(@Nullable io.lettuce.core.cluster.models.partitions.Partitions source) -
toRedisClusterNode
public static RedisClusterNode toRedisClusterNode(io.lettuce.core.cluster.models.partitions.RedisClusterNode source) - Since:
- 1.7
-
toSetArgs
public static io.lettuce.core.SetArgs toSetArgs(@Nullable Expiration expiration, @Nullable RedisStringCommands.SetOption option) - Parameters:
expiration- can be null.option- can be null.- Since:
- 1.7
-
toGeoArgsUnit
public static io.lettuce.core.GeoArgs.Unit toGeoArgsUnit(org.springframework.data.geo.Metric metric) ConvertMetricintoGeoArgs.Unit.- Since:
- 1.8
-
toGeoArgs
ConvertRedisGeoCommands.GeoRadiusCommandArgsintoGeoArgs.- Since:
- 1.8
-
toGeoArgs
ConvertRedisGeoCommands.GeoCommandArgsintoGeoArgs.- Since:
- 2.6
-
toBitFieldArgs
ConvertBitFieldSubCommandsintoBitFieldArgs.- Since:
- 2.1
-
bytesSetToGeoResultsConverter
public static Converter<Set<byte[]>,org.springframework.data.geo.GeoResults<RedisGeoCommands.GeoLocation<byte[]>>> bytesSetToGeoResultsConverter()- Since:
- 1.8
-
geoRadiusResponseToGeoResultsConverter
public static Converter<List<io.lettuce.core.GeoWithin<byte[]>>,org.springframework.data.geo.GeoResults<RedisGeoCommands.GeoLocation<byte[]>>> geoRadiusResponseToGeoResultsConverter(org.springframework.data.geo.Metric metric) - Since:
- 1.8
-
transactionResultUnwrapper
-