public class RedisCommandDescription extends Object implements Serializable
RedisMapper
.
When creating descriptor for the group of RedisDataType.HASH
and RedisDataType.SORTED_SET
,
you need to use first constructor RedisCommandDescription(RedisCommand, String)
.
If the additionalKey
is null
it will throw IllegalArgumentException
When RedisCommand
is not in group of RedisDataType.HASH
and RedisDataType.SORTED_SET
you can use second constructor RedisCommandDescription(RedisCommand)
Constructor and Description |
---|
RedisCommandDescription(RedisCommand redisCommand)
Use this constructor when command type is not in group
RedisDataType.HASH or RedisDataType.SORTED_SET . |
RedisCommandDescription(RedisCommand redisCommand,
String additionalKey)
Use this constructor when data type is
RedisDataType.HASH or RedisDataType.SORTED_SET . |
Modifier and Type | Method and Description |
---|---|
String |
getAdditionalKey()
Returns the additional key if data type is
RedisDataType.HASH and RedisDataType.SORTED_SET . |
RedisCommand |
getCommand()
Returns the
RedisCommand . |
public RedisCommandDescription(RedisCommand redisCommand, String additionalKey)
RedisDataType.HASH
or RedisDataType.SORTED_SET
.
If different data type is specified, additionalKey
is ignored.redisCommand
- the redis command type RedisCommand
additionalKey
- additional key for Hash and Sorted set data typepublic RedisCommandDescription(RedisCommand redisCommand)
RedisDataType.HASH
or RedisDataType.SORTED_SET
.redisCommand
- the redis data type RedisCommand
public RedisCommand getCommand()
RedisCommand
.public String getAdditionalKey()
RedisDataType.HASH
and RedisDataType.SORTED_SET
.Copyright © 2014–2017 The Apache Software Foundation. All rights reserved.