public abstract class JedisConverters 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 |
---|
JedisConverters() |
Modifier and Type | Method and Description |
---|---|
static byte[] |
boundaryToBytesForZRange(RedisZSetCommands.Range.Boundary boundary,
byte[] defaultValue)
Converts a given
RedisZSetCommands.Range.Boundary to its binary representation suitable for ZRANGEBY* commands, despite
ZRANGEBYLEX. |
static byte[] |
boundaryToBytesForZRangeByLex(RedisZSetCommands.Range.Boundary boundary,
byte[] defaultValue)
Converts a given
RedisZSetCommands.Range.Boundary to its binary representation suitable for ZRANGEBYLEX command. |
static ListConverter<byte[],String> |
bytesListToStringListConverter() |
static Converter<Exception,DataAccessException> |
exceptionConverter() |
static ListConverter<redis.clients.jedis.GeoCoordinate,Point> |
geoCoordinateToPointConverter() |
static Converter<List<redis.clients.jedis.GeoRadiusResponse>,GeoResults<RedisGeoCommands.GeoLocation<byte[]>>> |
geoRadiusResponseToGeoResultsConverter(Metric metric)
|
static ListConverter<byte[],Long> |
getBytesListToLongListConverter() |
static ListConverter<String,byte[]> |
stringListToByteList() |
static MapConverter<String,byte[]> |
stringMapToByteMap() |
static SetConverter<String,byte[]> |
stringSetToByteSet() |
static Converter<String,byte[]> |
stringToBytes() |
static byte[][] |
toBitfieldCommandArguments(BitFieldSubCommands bitfieldOperation)
Convert given
BitFieldSubCommands into argument array. |
static redis.clients.jedis.BitOP |
toBitOp(RedisStringCommands.BitOperation bitOp) |
static byte[][] |
toByteArrays(Map<byte[],byte[]> source) |
static byte[] |
toBytes(Double source) |
static byte[] |
toBytes(Integer source) |
static byte[] |
toBytes(Long source) |
static byte[] |
toBytes(String source) |
static DataAccessException |
toDataAccessException(Exception ex) |
static ValueEncoding |
toEncoding(byte[] source)
Convert the given
source value to the corresponding ValueEncoding . |
static redis.clients.jedis.GeoCoordinate |
toGeoCoordinate(Point source)
Convert
Point into GeoCoordinate . |
static redis.clients.jedis.params.GeoRadiusParam |
toGeoRadiusParam(RedisGeoCommands.GeoRadiusCommandArgs source)
Convert
RedisGeoCommands.GeoRadiusCommandArgs into GeoRadiusParam . |
static redis.clients.jedis.GeoUnit |
toGeoUnit(Metric metric)
Convert
Metric into GeoUnit . |
static List<RedisClientInfo> |
toListOfRedisClientInformation(String source) |
static List<RedisServer> |
toListOfRedisServer(List<Map<String,String>> source) |
static redis.clients.jedis.ListPosition |
toListPosition(RedisListCommands.Position source) |
static RedisClusterNode |
toNode(Object source) |
static redis.clients.jedis.ScanParams |
toScanParams(ScanOptions options)
Convert
ScanOptions to Jedis ScanParams . |
static redis.clients.jedis.params.SetParams |
toSetCommandExPxArgument(Expiration expiration)
Converts a given
Expiration to the according SET command argument. |
static redis.clients.jedis.params.SetParams |
toSetCommandExPxArgument(Expiration expiration,
redis.clients.jedis.params.SetParams params)
Converts a given
Expiration to the according SET command argument. |
static redis.clients.jedis.params.SetParams |
toSetCommandNxXxArgument(RedisStringCommands.SetOption option)
Converts a given
RedisStringCommands.SetOption to the according SET command argument. |
static redis.clients.jedis.params.SetParams |
toSetCommandNxXxArgument(RedisStringCommands.SetOption option,
redis.clients.jedis.params.SetParams params)
Converts a given
RedisStringCommands.SetOption to the according SET command argument. |
static redis.clients.jedis.SortingParams |
toSortingParams(SortParameters params) |
static String |
toString(byte[] source) |
static String[] |
toStrings(byte[][] source) |
static List<String> |
toStrings(List<byte[]> source) |
static Map<byte[],Double> |
toTupleMap(Set<RedisZSetCommands.Tuple> tuples)
|
static Set<RedisZSetCommands.Tuple> |
toTupleSet(Set<redis.clients.jedis.Tuple> source) |
static SetConverter<redis.clients.jedis.Tuple,RedisZSetCommands.Tuple> |
tupleSetToTupleSet() |
static ListConverter<redis.clients.jedis.Tuple,RedisZSetCommands.Tuple> |
tuplesToTuples()
|
deserializingGeoResultsConverter, distanceConverterForMetric, 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
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 ListConverter<redis.clients.jedis.Tuple,RedisZSetCommands.Tuple> tuplesToTuples()
public static ListConverter<String,byte[]> stringListToByteList()
public static SetConverter<String,byte[]> stringSetToByteSet()
public static MapConverter<String,byte[]> stringMapToByteMap()
public static SetConverter<redis.clients.jedis.Tuple,RedisZSetCommands.Tuple> tupleSetToTupleSet()
public static Converter<Exception,DataAccessException> exceptionConverter()
public static String[] toStrings(byte[][] source)
public static Set<RedisZSetCommands.Tuple> toTupleSet(Set<redis.clients.jedis.Tuple> source)
public static Map<byte[],Double> toTupleMap(Set<RedisZSetCommands.Tuple> tuples)
tuples
- must not be null.public static byte[] toBytes(Integer source)
public static byte[] toBytes(Long source)
public static byte[] toBytes(Double source)
source
- public static byte[] toBytes(String source)
public static ValueEncoding toEncoding(@Nullable byte[] source)
source
value to the corresponding ValueEncoding
.source
- can be null.ValueEncoding
for given source
. Never null.public static RedisClusterNode toNode(Object source)
source
- public static List<RedisClientInfo> toListOfRedisClientInformation(String source)
source
- public static List<RedisServer> toListOfRedisServer(List<Map<String,String>> source)
source
- public static DataAccessException toDataAccessException(Exception ex)
public static redis.clients.jedis.ListPosition toListPosition(RedisListCommands.Position source)
public static byte[][] toByteArrays(Map<byte[],byte[]> source)
@Nullable public static redis.clients.jedis.SortingParams toSortingParams(@Nullable SortParameters params)
public static redis.clients.jedis.BitOP toBitOp(RedisStringCommands.BitOperation bitOp)
public static byte[] boundaryToBytesForZRange(@Nullable RedisZSetCommands.Range.Boundary boundary, byte[] defaultValue)
RedisZSetCommands.Range.Boundary
to its binary representation suitable for ZRANGEBY* commands, despite
ZRANGEBYLEX.boundary
- defaultValue
- public static byte[] boundaryToBytesForZRangeByLex(@Nullable RedisZSetCommands.Range.Boundary boundary, byte[] defaultValue)
RedisZSetCommands.Range.Boundary
to its binary representation suitable for ZRANGEBYLEX command.boundary
- public static redis.clients.jedis.params.SetParams toSetCommandExPxArgument(Expiration expiration)
Expiration
to the according SET
command argument.
expiration
- must not be null.public static redis.clients.jedis.params.SetParams toSetCommandExPxArgument(Expiration expiration, redis.clients.jedis.params.SetParams params)
Expiration
to the according SET
command argument.
expiration
- must not be null.params
- public static redis.clients.jedis.params.SetParams toSetCommandNxXxArgument(RedisStringCommands.SetOption option)
option
- must not be null.public static redis.clients.jedis.params.SetParams toSetCommandNxXxArgument(RedisStringCommands.SetOption option, redis.clients.jedis.params.SetParams params)
option
- must not be null.params
- public static redis.clients.jedis.ScanParams toScanParams(ScanOptions options)
ScanOptions
to Jedis ScanParams
.options
- public static List<String> toStrings(List<byte[]> source)
source
- public static ListConverter<byte[],String> bytesListToStringListConverter()
public static ListConverter<byte[],Long> getBytesListToLongListConverter()
public static ListConverter<redis.clients.jedis.GeoCoordinate,Point> geoCoordinateToPointConverter()
public static Converter<List<redis.clients.jedis.GeoRadiusResponse>,GeoResults<RedisGeoCommands.GeoLocation<byte[]>>> geoRadiusResponseToGeoResultsConverter(Metric metric)
metric
- public static redis.clients.jedis.GeoUnit toGeoUnit(Metric metric)
Metric
into GeoUnit
.metric
- public static redis.clients.jedis.GeoCoordinate toGeoCoordinate(Point source)
Point
into GeoCoordinate
.source
- public static redis.clients.jedis.params.GeoRadiusParam toGeoRadiusParam(RedisGeoCommands.GeoRadiusCommandArgs source)
RedisGeoCommands.GeoRadiusCommandArgs
into GeoRadiusParam
.source
- public static byte[][] toBitfieldCommandArguments(BitFieldSubCommands bitfieldOperation)
BitFieldSubCommands
into argument array.bitfieldOperation
- Copyright © 2011–2021 Pivotal Software, Inc.. All rights reserved.