Class LettuceConverters
java.lang.Object
org.springframework.data.redis.connection.convert.Converters
org.springframework.data.redis.connection.lettuce.LettuceConverters
Lettuce type converters. This is an internal class not intended to by used outside of the framework.
- Author:
- Jennifer Hickey, Christoph Strobl, Thomas Darimont, Mark Paluch, Ninad Divadkar, dengliming, Chris Bono, Vikas Garg, John Blum, Roman Osadchuk, Yordan Tsintsov
-
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[]>, GeoResults<RedisGeoCommands.GeoLocation<byte[]>>> geoCoordinatesToPoint(@Nullable GeoCoordinates geoCoordinate) static Converter<List<GeoWithin<byte[]>>, GeoResults<RedisGeoCommands.GeoLocation<byte[]>>> static List<RedisClusterNode> static RedisURIsentinelConfigurationToRedisURI(RedisSentinelConfiguration sentinelConfiguration) static Converter<String, List<RedisClientInfo>> static BitFieldArgstoBitFieldArgs(@Nullable BitFieldSubCommands subCommands) ConvertBitFieldSubCommandsintoBitFieldArgs.static booleantoBoolean(long value) static booleanstatic byte @Nullable []static byte[]static byte[]static byte[]toBytesList(@Nullable KeyValue<byte[], byte[]> source) toBytesSet(@Nullable List<byte[]> source) static GeoArgsConvertRedisGeoCommands.GeoCommandArgsintoGeoArgs.static GeoArgsConvertRedisGeoCommands.GeoRadiusCommandArgsintoGeoArgs.static GeoArgs.UnittoGeoArgsUnit(Metric metric) ConvertMetricintoGeoArgs.Unit.static inttoInt(boolean value) static Limitstatic List<RedisClientInfo> toListOfRedisClientInformation(String clientList) static List<RedisServer> toListOfRedisServer(List<Map<String, String>> source) static Map<byte[], byte[]> static <T> Range<T> Convert aRedisZSetCommands.Rangeto a lettuceRange.static <T> Range<T> static RedisClusterNodetoRedisClusterNode(RedisClusterNode source) static <T> Range<T> toRevRange(Range<T> range) static ScriptOutputTypetoScriptOutputType(ReturnType returnType) static SetArgstoSetArgs(@Nullable Expiration expiration, @Nullable RedisStringCommands.SetOption option) Deprecated, for removal: This API element is subject to removal in a future version.since 4.1.static SortArgstoSortArgs(SortParameters params) static TupletoTuple(@Nullable ScoredValue<byte[]> source) static Converter<TransactionResult, List<Object>> Methods inherited from class 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
-
stringToRedisClientListConverter
-
scoredValuesToTupleList
-
toBoolean
public static boolean toBoolean(long value) -
longToBooleanConverter
-
toLong
-
toBytesSet
-
toBytesList
-
toTuple
@Contract("null -> null;!null -> !null") public static Tuple toTuple(@Nullable ScoredValue<byte[]> source) -
toString
-
toScriptOutputType
-
toBoolean
-
toInt
public static int toInt(boolean value) -
toMap
-
toSortArgs
-
toListOfRedisClientInformation
-
toLimit
-
toRange
Convert aRedisZSetCommands.Rangeto a lettuceRange.- Since:
- 2.0
-
toRange
-
toRevRange
-
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 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
-
toRedisClusterNode
- Since:
- 1.7
-
toSetArgs
@Deprecated(since="4.1", forRemoval=true) public static SetArgs toSetArgs(@Nullable Expiration expiration, @Nullable RedisStringCommands.SetOption option) Deprecated, for removal: This API element is subject to removal in a future version.since 4.1.- Parameters:
expiration- can be null.option- can be null.- Since:
- 1.7
-
toGeoArgsUnit
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[]>, GeoResults<RedisGeoCommands.GeoLocation<byte[]>>> bytesSetToGeoResultsConverter()- Since:
- 1.8
-
geoRadiusResponseToGeoResultsConverter
public static Converter<List<GeoWithin<byte[]>>, GeoResults<RedisGeoCommands.GeoLocation<byte[]>>> geoRadiusResponseToGeoResultsConverter(Metric metric) - Since:
- 1.8
-
transactionResultUnwrapper
-