public interface RedisService
Modifier and Type | Field and Description |
---|---|
static String |
REDIS_HOST_PROP |
static String |
REDIS_PORT_PROP |
Modifier and Type | Method and Description |
---|---|
boolean |
delete(String key)
Delete key from the redis.
|
boolean |
exists(String key)
Check if the key exists in Redis.
|
String |
get(String key)
Gets the value by key.
|
List<String> |
getByWildcard(String key)
Gets the objects stored in Redis as a list of strings.
|
List<String> |
getKeys(String key)
Gets the list of keys by the given wildcard key.
|
boolean |
isEnabled()
Checks if service is enabled.
|
boolean |
put(String key,
String value)
Put the key-value pair in redis.
|
boolean |
putEx(String key,
String value,
int sec)
Put the key-value pair in redis.
|
static final String REDIS_HOST_PROP
static final String REDIS_PORT_PROP
boolean delete(String key)
key
- the keyString get(String key)
key
- the keyboolean isEnabled()
boolean put(String key, String value)
key
- the keyvalue
- the valueboolean putEx(String key, String value, int sec)
key
- the keyvalue
- the valuesec
- the number of seconds until key will expireboolean exists(String key)
key
- the keyList<String> getByWildcard(String key)
key
- the wildcard keyList<String> getKeys(String key)
key
- the wildcard keyCopyright © 2010-2020 Toolsverse. All Rights Reserved.