public abstract class LettuceConverters extends Converters
Modifier and Type | Field and Description |
---|---|
static byte[] |
MINUS_BYTES |
static byte[] |
NEGATIVE_INFINITY_BYTES |
static byte[] |
PLUS_BYTES |
static byte[] |
POSITIVE_INFINITY_BYTES |
Constructor and Description |
---|
LettuceConverters() |
Modifier and Type | Method and Description |
---|---|
static String |
boundaryToBytesForZRange(RedisZSetCommands.Range.Boundary boundary,
byte[] defaultValue)
Converts a given
RedisZSetCommands.Range.Boundary to its binary representation suitable for ZRANGEBY* commands, despite
ZRANGEBYLEX. |
static String |
boundaryToBytesForZRangeByLex(RedisZSetCommands.Range.Boundary boundary,
byte[] defaultValue)
Converts a given
RedisZSetCommands.Range.Boundary to its binary representation suitable for ZRANGEBYLEX command. |
static String |
boundaryToStringForZRange(RedisZSetCommands.Range.Boundary boundary,
String defaultValue) |
static Converter<Collection<byte[]>,List<byte[]>> |
bytesCollectionToBytesList() |
static Converter<List<byte[]>,Set<byte[]>> |
bytesListToBytesSet() |
static Converter<List<byte[]>,Map<byte[],byte[]>> |
bytesListToMapConverter() |
static Converter<List<byte[]>,List<RedisZSetCommands.Tuple>> |
bytesListToTupleListConverter() |
static Converter<Collection<byte[]>,List<byte[]>> |
bytesSetToBytesList() |
static Converter<Set<byte[]>,GeoResults<RedisGeoCommands.GeoLocation<byte[]>>> |
bytesSetToGeoResultsConverter()
|
static Converter<byte[],String> |
bytesToString() |
static Converter<Date,Long> |
dateToLong() |
static Converter<Exception,DataAccessException> |
exceptionConverter() |
static Point |
geoCoordinatesToPoint(io.lettuce.core.GeoCoordinates geoCoordinates) |
static ListConverter<io.lettuce.core.GeoCoordinates,Point> |
geoCoordinatesToPointConverter() |
static Converter<List<io.lettuce.core.GeoWithin<byte[]>>,GeoResults<RedisGeoCommands.GeoLocation<byte[]>>> |
geoRadiusResponseToGeoResultsConverter(Metric metric)
|
static <K,V> ListConverter<io.lettuce.core.KeyValue<K,V>,V> |
keyValueListUnwrapper() |
static Converter<io.lettuce.core.KeyValue<byte[],byte[]>,List<byte[]>> |
keyValueToBytesList() |
static Converter<Long,Boolean> |
longToBooleanConverter() |
static List<RedisClusterNode> |
partitionsToClusterNodes(io.lettuce.core.cluster.models.partitions.Partitions partitions) |
static Converter<List<io.lettuce.core.ScoredValue<byte[]>>,List<RedisZSetCommands.Tuple>> |
scoredValuesToTupleList() |
static Converter<List<io.lettuce.core.ScoredValue<byte[]>>,Set<RedisZSetCommands.Tuple>> |
scoredValuesToTupleSet() |
static Converter<io.lettuce.core.ScoredValue<byte[]>,RedisZSetCommands.Tuple> |
scoredValueToTuple() |
static io.lettuce.core.RedisURI |
sentinelConfigurationToRedisURI(RedisSentinelConfiguration sentinelConfiguration) |
static Converter<String,List<RedisClientInfo>> |
stringToRedisClientListConverter() |
static byte[][] |
subarray(byte[][] input,
int index) |
static io.lettuce.core.BitFieldArgs |
toBitFieldArgs(BitFieldSubCommands subCommands)
Convert
BitFieldSubCommands into BitFieldArgs . |
static boolean |
toBoolean(RedisListCommands.Position where) |
static byte[] |
toBytes(Double source) |
static byte[] |
toBytes(Integer source) |
static byte[] |
toBytes(Long source) |
static byte[] |
toBytes(String source) |
static List<byte[]> |
toBytesList(Collection<byte[]> source) |
static List<byte[]> |
toBytesList(io.lettuce.core.KeyValue<byte[],byte[]> source) |
static Set<byte[]> |
toBytesSet(List<byte[]> source) |
static io.lettuce.core.GeoArgs |
toGeoArgs(RedisGeoCommands.GeoRadiusCommandArgs args)
Convert
RedisGeoCommands.GeoRadiusCommandArgs into GeoArgs . |
static io.lettuce.core.GeoArgs.Unit |
toGeoArgsUnit(Metric metric)
Convert
Metric into GeoArgs.Unit . |
static int |
toInt(boolean value) |
static io.lettuce.core.Limit |
toLimit(RedisZSetCommands.Limit limit)
Convert a
RedisZSetCommands.Limit to a lettuce
Limit . |
static List<RedisClientInfo> |
toListOfRedisClientInformation(String clientList) |
static List<RedisServer> |
toListOfRedisServer(List<Map<String,String>> source) |
static Long |
toLong(Date source) |
static Map<byte[],byte[]> |
toMap(List<byte[]> source) |
static <T> io.lettuce.core.Range<T> |
toRange(RedisZSetCommands.Range range)
Convert a
RedisZSetCommands.Range to a lettuce Range . |
static RedisClusterNode |
toRedisClusterNode(io.lettuce.core.cluster.models.partitions.RedisClusterNode source) |
static <T> io.lettuce.core.Range<T> |
toRevRange(RedisZSetCommands.Range range)
Convert a
RedisZSetCommands.Range to a lettuce Range and
reverse boundaries. |
static io.lettuce.core.ScriptOutputType |
toScriptOutputType(ReturnType returnType) |
static io.lettuce.core.SetArgs |
toSetArgs(Expiration expiration,
RedisStringCommands.SetOption option)
|
static io.lettuce.core.SortArgs |
toSortArgs(SortParameters params) |
static String |
toString(byte[] source) |
static List<RedisZSetCommands.Tuple> |
toTuple(List<byte[]> list) |
static RedisZSetCommands.Tuple |
toTuple(io.lettuce.core.ScoredValue<byte[]> source) |
static Set<RedisZSetCommands.Tuple> |
toTupleSet(List<io.lettuce.core.ScoredValue<byte[]>> source) |
static Converter<io.lettuce.core.TransactionResult,List<Object>> |
transactionResultUnwrapper() |
deserializingGeoResultsConverter, distanceConverterForMetric, listToPropertiesConverter, longToBoolean, mapToPropertiesConverter, millisecondsToTimeUnit, millisecondsToTimeUnit, secondsToDuration, secondsToTimeUnit, secondsToTimeUnit, stringToBoolean, stringToBooleanConverter, stringToDataType, stringToProps, toBit, toBoolean, toClusterNode, toDataType, toObjects, toProperties, toProperties, toProperties, toSetOfRedisClusterNodes, toSetOfRedisClusterNodes, toTimeMillis
public static final byte[] PLUS_BYTES
public static final byte[] MINUS_BYTES
public static final byte[] POSITIVE_INFINITY_BYTES
public static final byte[] NEGATIVE_INFINITY_BYTES
public static List<RedisZSetCommands.Tuple> toTuple(List<byte[]> list)
public static Converter<List<byte[]>,List<RedisZSetCommands.Tuple>> bytesListToTupleListConverter()
public static Point geoCoordinatesToPoint(io.lettuce.core.GeoCoordinates geoCoordinates)
public static Converter<String,List<RedisClientInfo>> stringToRedisClientListConverter()
public static Converter<io.lettuce.core.KeyValue<byte[],byte[]>,List<byte[]>> keyValueToBytesList()
public static Converter<Collection<byte[]>,List<byte[]>> bytesSetToBytesList()
public static Converter<Collection<byte[]>,List<byte[]>> bytesCollectionToBytesList()
public static Converter<List<io.lettuce.core.ScoredValue<byte[]>>,Set<RedisZSetCommands.Tuple>> scoredValuesToTupleSet()
public static Converter<List<io.lettuce.core.ScoredValue<byte[]>>,List<RedisZSetCommands.Tuple>> scoredValuesToTupleList()
public static Converter<io.lettuce.core.ScoredValue<byte[]>,RedisZSetCommands.Tuple> scoredValueToTuple()
public static Converter<Exception,DataAccessException> exceptionConverter()
public static List<byte[]> toBytesList(io.lettuce.core.KeyValue<byte[],byte[]> source)
public static List<byte[]> toBytesList(Collection<byte[]> source)
public static Set<RedisZSetCommands.Tuple> toTupleSet(List<io.lettuce.core.ScoredValue<byte[]>> source)
public static RedisZSetCommands.Tuple toTuple(io.lettuce.core.ScoredValue<byte[]> source)
public static String toString(byte[] source)
public static io.lettuce.core.ScriptOutputType toScriptOutputType(ReturnType returnType)
public static boolean toBoolean(RedisListCommands.Position where)
public static int toInt(boolean value)
public static Converter<List<byte[]>,Map<byte[],byte[]>> bytesListToMapConverter()
public static io.lettuce.core.SortArgs toSortArgs(SortParameters params)
public static List<RedisClientInfo> toListOfRedisClientInformation(String clientList)
public static byte[][] subarray(byte[][] input, int index)
public static String boundaryToStringForZRange(RedisZSetCommands.Range.Boundary boundary, String defaultValue)
public static io.lettuce.core.Limit toLimit(RedisZSetCommands.Limit limit)
RedisZSetCommands.Limit
to a lettuce
Limit
.limit
- Limit
.public static <T> io.lettuce.core.Range<T> toRange(RedisZSetCommands.Range range)
RedisZSetCommands.Range
to a lettuce Range
.range
- public static <T> io.lettuce.core.Range<T> toRevRange(RedisZSetCommands.Range range)
RedisZSetCommands.Range
to a lettuce Range
and
reverse boundaries.range
- public static List<RedisServer> toListOfRedisServer(List<Map<String,String>> source)
source
- List of Maps containing node details from SENTINEL SLAVES or SENTINEL MASTERS. May be empty or
null.RedisServer
's. List is empty if List of Maps is empty.public static io.lettuce.core.RedisURI sentinelConfigurationToRedisURI(RedisSentinelConfiguration sentinelConfiguration)
sentinelConfiguration
- the sentinel configuration containing one or more sentinels and a master name. Must
not be nullRedisURI
containing Redis Sentinel addresses of RedisSentinelConfiguration
public static byte[] toBytes(String source)
public static byte[] toBytes(Integer source)
public static byte[] toBytes(Long source)
public static byte[] toBytes(Double source)
source
- public static String boundaryToBytesForZRange(RedisZSetCommands.Range.Boundary boundary, byte[] defaultValue)
RedisZSetCommands.Range.Boundary
to its binary representation suitable for ZRANGEBY* commands, despite
ZRANGEBYLEX.boundary
- defaultValue
- public static String boundaryToBytesForZRangeByLex(RedisZSetCommands.Range.Boundary boundary, byte[] defaultValue)
RedisZSetCommands.Range.Boundary
to its binary representation suitable for ZRANGEBYLEX command.boundary
- public static List<RedisClusterNode> partitionsToClusterNodes(io.lettuce.core.cluster.models.partitions.Partitions partitions)
public static RedisClusterNode toRedisClusterNode(io.lettuce.core.cluster.models.partitions.RedisClusterNode source)
source
- public static io.lettuce.core.SetArgs toSetArgs(@Nullable Expiration expiration, @Nullable RedisStringCommands.SetOption option)
expiration
- can be null.option
- can be null.public static io.lettuce.core.GeoArgs.Unit toGeoArgsUnit(Metric metric)
Metric
into GeoArgs.Unit
.metric
- public static io.lettuce.core.GeoArgs toGeoArgs(RedisGeoCommands.GeoRadiusCommandArgs args)
RedisGeoCommands.GeoRadiusCommandArgs
into GeoArgs
.args
- public static io.lettuce.core.BitFieldArgs toBitFieldArgs(BitFieldSubCommands subCommands)
BitFieldSubCommands
into BitFieldArgs
.subCommands
- public static Converter<Set<byte[]>,GeoResults<RedisGeoCommands.GeoLocation<byte[]>>> bytesSetToGeoResultsConverter()
public static Converter<List<io.lettuce.core.GeoWithin<byte[]>>,GeoResults<RedisGeoCommands.GeoLocation<byte[]>>> geoRadiusResponseToGeoResultsConverter(Metric metric)
metric
- public static ListConverter<io.lettuce.core.GeoCoordinates,Point> geoCoordinatesToPointConverter()
public static <K,V> ListConverter<io.lettuce.core.KeyValue<K,V>,V> keyValueListUnwrapper()
Copyright © 2011–2019 Pivotal Software, Inc.. All rights reserved.