Class LettuceConverters
java.lang.Object
io.valkey.springframework.data.valkey.connection.convert.Converters
io.valkey.springframework.data.valkey.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 org.springframework.core.convert.converter.Converter<Set<byte[]>,org.springframework.data.geo.GeoResults<ValkeyGeoCommands.GeoLocation<byte[]>>> static org.springframework.data.geo.PointgeoCoordinatesToPoint(io.lettuce.core.GeoCoordinates geoCoordinate) static org.springframework.core.convert.converter.Converter<List<io.lettuce.core.GeoWithin<byte[]>>,org.springframework.data.geo.GeoResults<ValkeyGeoCommands.GeoLocation<byte[]>>> geoRadiusResponseToGeoResultsConverter(org.springframework.data.geo.Metric metric) GetConvertercapable of converingGeoWithinintoGeoResults.static List<ValkeyClusterNode>partitionsToClusterNodes(io.lettuce.core.cluster.models.partitions.Partitions source) static org.springframework.core.convert.converter.Converter<List<io.lettuce.core.ScoredValue<byte[]>>,List<Tuple>> static io.lettuce.core.RedisURIsentinelConfigurationToValkeyURI(ValkeySentinelConfiguration sentinelConfiguration) static org.springframework.core.convert.converter.Converter<String,List<ValkeyClientInfo>> 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.GeoArgsConvertValkeyGeoCommands.GeoCommandArgsintoGeoArgs.static io.lettuce.core.GeoArgsConvertValkeyGeoCommands.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<ValkeyClientInfo>toListOfValkeyClientInformation(String clientList) static List<ValkeyServer>toListOfValkeyServer(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 aValkeyZSetCommands.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 <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, ValkeyStringCommands.SetOption option) static io.lettuce.core.SortArgstoSortArgs(SortParameters params) static StringtoString(byte[] source) static TupletoTuple(io.lettuce.core.ScoredValue<byte[]> source) static ValkeyClusterNodetoValkeyClusterNode(io.lettuce.core.cluster.models.partitions.RedisClusterNode source) static org.springframework.core.convert.converter.Converter<io.lettuce.core.TransactionResult,List<Object>> Methods inherited from class io.valkey.springframework.data.valkey.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, toSetOfValkeyClusterNodes, toSetOfValkeyClusterNodes, 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) -
stringToValkeyClientListConverter
public static org.springframework.core.convert.converter.Converter<String,List<ValkeyClientInfo>> stringToValkeyClientListConverter() -
scoredValuesToTupleList
-
toBoolean
public static boolean toBoolean(long value) -
longToBooleanConverter
public static org.springframework.core.convert.converter.Converter<Long,Boolean> longToBooleanConverter()- Since:
- 1.3
-
toLong
-
toBytesSet
-
toBytesList
-
toBytesList
-
toTuple
-
toString
-
toScriptOutputType
-
toBoolean
-
toInt
public static int toInt(boolean value) -
toMap
-
toSortArgs
-
toListOfValkeyClientInformation
-
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 aValkeyZSetCommands.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
-
toListOfValkeyServer
- Parameters:
source- List of Maps containing node details from SENTINEL REPLICAS or SENTINEL MASTERS. May be empty or null.- Returns:
- List of
ValkeyServer's. List is empty if List of Maps is empty. - Since:
- 1.5
-
sentinelConfigurationToValkeyURI
public static io.lettuce.core.RedisURI sentinelConfigurationToValkeyURI(ValkeySentinelConfiguration sentinelConfiguration) - Parameters:
sentinelConfiguration- the sentinel configuration containing one or more sentinels and a master name. Must not be null- Returns:
- A
RedisURIcontaining Valkey Sentinel addresses ofValkeySentinelConfiguration - Since:
- 1.5
-
toBytes
-
toBytes
-
toBytes
-
toBytes
- Since:
- 1.6
-
partitionsToClusterNodes
public static List<ValkeyClusterNode> partitionsToClusterNodes(@Nullable io.lettuce.core.cluster.models.partitions.Partitions source) -
toValkeyClusterNode
public static ValkeyClusterNode toValkeyClusterNode(io.lettuce.core.cluster.models.partitions.RedisClusterNode source) - Since:
- 1.7
-
toSetArgs
public static io.lettuce.core.SetArgs toSetArgs(@Nullable Expiration expiration, @Nullable ValkeyStringCommands.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
ConvertValkeyGeoCommands.GeoRadiusCommandArgsintoGeoArgs.- Since:
- 1.8
-
toGeoArgs
ConvertValkeyGeoCommands.GeoCommandArgsintoGeoArgs.- Since:
- 2.6
-
toBitFieldArgs
ConvertBitFieldSubCommandsintoBitFieldArgs.- Since:
- 2.1
-
bytesSetToGeoResultsConverter
public static org.springframework.core.convert.converter.Converter<Set<byte[]>,org.springframework.data.geo.GeoResults<ValkeyGeoCommands.GeoLocation<byte[]>>> bytesSetToGeoResultsConverter()- Since:
- 1.8
-
geoRadiusResponseToGeoResultsConverter
public static org.springframework.core.convert.converter.Converter<List<io.lettuce.core.GeoWithin<byte[]>>,org.springframework.data.geo.GeoResults<ValkeyGeoCommands.GeoLocation<byte[]>>> geoRadiusResponseToGeoResultsConverter(org.springframework.data.geo.Metric metric) GetConvertercapable of converingGeoWithinintoGeoResults.- Since:
- 1.8
-
transactionResultUnwrapper
-