public interface RedisFacade
| Modifier and Type | Interface and Description |
|---|---|
static interface |
RedisFacade.RedisPubSub
Used to implement PUBSUB mechanism.
|
static interface |
RedisFacade.ResponseFacade<T>
Used to wrap implementation's response for transactions.
|
static interface |
RedisFacade.TransactionFacade
Used to encapsulate redis library's transaction (MULTI) processing.
|
static interface |
RedisFacade.TransactionRunner<T>
Implementation of this interface can be run within a redis transaction.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes connections to redis.
|
Long |
del(byte[]... keys)
See redis.clients.jedis.BinaryJedisCommands#del(byte[]...)
|
Boolean |
exists(byte[] key)
See redis.clients.jedis.BinaryJedisCommands#exists(byte[])
|
Long |
expire(byte[] key,
int value)
See redis.clients.jedis.BinaryJedisCommands#expire(byte[], int)
|
Long |
expireAt(byte[] key,
long unixTime)
See redis.clients.jedis.BinaryJedisCommands#expireAt(byte[], long)
|
byte[] |
get(byte[] key)
See redis.clients.jedis.BinaryJedisCommands#get(byte[])
|
Long |
hdel(byte[] key,
byte[]... fields)
See redis.clients.jedis.BinaryJedisCommands#hdel(byte[], byte[]...)
|
Set<byte[]> |
hkeys(byte[] key)
See redis.clients.jedis.BinaryJedisCommands#hkeys(byte[])
|
List<byte[]> |
hmget(byte[] key,
byte[]... fields)
See redis.clients.jedis.BinaryJedisCommands#hmget(byte[], byte[]...)
|
String |
hmset(byte[] key,
Map<byte[],byte[]> hash)
See redis.clients.jedis.BinaryJedisCommands#hmset(byte[], Map)
|
Long |
hset(byte[] key,
byte[] field,
byte[] value)
See redis.clients.jedis.BinaryJedisCommands#hset(byte[], byte[], byte[])
|
Long |
hsetnx(byte[] key,
byte[] field,
byte[] value)
See redis.clients.jedis.BinaryJedisCommands#hsetnx(byte[], byte[], byte[])
|
String |
info(String section)
Returns information about server
|
boolean |
isRedisException(Exception e)
Returns
true if exception was thrown by redis library |
Long |
persist(byte[] key)
See redis.clients.jedis.BinaryJedisCommands#persist(byte[])
|
void |
psubscribe(RedisFacade.RedisPubSub listener,
String pattern)
See BinaryJedisCommands#psubscribe(BinaryJedisPubSub, byte[]...)
|
Long |
publish(byte[] channel,
byte[] message)
See redis.clients.jedis.BinaryJedisCommands#publish(byte[], byte[])
|
void |
punsubscribe(RedisFacade.RedisPubSub expirationListener,
byte[] pattern)
See BinaryJedisPubSub#punsubscribe(byte[]...)
|
String |
rename(byte[] oldkey,
byte[] newkey)
See redis.clients.jedis.BinaryJedisCommands#rename(byte[], byte[])
|
void |
requestFinished()
Dissociates jedis connection from the current thread and returns it to the pool.
|
Long |
sadd(byte[] key,
byte[]... member)
See redis.clients.jedis.BinaryJedisCommands#sadd(byte[], byte[]...)
|
String |
set(byte[] key,
byte[] value)
See redis.clients.jedis.BinaryJedisCommands#set(byte[], byte[])
|
String |
setex(byte[] key,
int expiry,
byte[] value)
See redis.clients.jedis.BinaryJedisCommands#setx(byte[], int, byte[])
|
Set<byte[]> |
smembers(byte[] key)
See redis.clients.jedis.BinaryJedisCommands#smembers(byte[])
|
Set<byte[]> |
spop(byte[] key,
long count)
See redis.clients.jedis.BinaryJedisCommands#spop(byte[], long)
|
void |
srem(byte[] key,
byte[]... member)
See redis.clients.jedis.BinaryJedisCommands#srem(byte[], byte[]...)
|
void |
startMonitoring(com.codahale.metrics.MetricRegistry metrics)
Starts monitoring Redis interaction.
|
boolean |
supportsMultiSpop()
Returns true if redis implementation supports SPOP that returns multiple elements (http://redis.io/commands/spop).
|
<T> RedisFacade.ResponseFacade<T> |
transaction(byte[] key,
RedisFacade.TransactionRunner<T> transaction)
Executes redis transaction associated to a key.
|
Long |
zadd(byte[] key,
double score,
byte[] elem)
See redis.clients.jedis.BinaryJedisCommands#zadd(byte[], byte[]...)
|
Set<byte[]> |
zrange(byte[] key,
long start,
long end)
See redis.clients.jedis.BinaryJedisCommands#zrange(byte[], long, long)
|
Set<byte[]> |
zrangeByScore(byte[] key,
double start,
double end)
See redis.clients.jedis.BinaryJedisCommands#zrangeByScore(byte[], double, double)
|
Long |
zrem(byte[] key,
byte[]... fields)
See redis.clients.jedis.BinaryJedisCommands#zrem(byte[], byte[]...)
|
void psubscribe(RedisFacade.RedisPubSub listener, String pattern)
listener - pattern - void punsubscribe(RedisFacade.RedisPubSub expirationListener, byte[] pattern)
expirationListener - pattern - Long hdel(byte[] key, byte[]... fields)
key - key as byte arrayfields - List<byte[]> hmget(byte[] key, byte[]... fields)
key - key as byte arrayfields - String hmset(byte[] key, Map<byte[],byte[]> hash)
key - key as byte arrayhash - map of fields to modifyLong hsetnx(byte[] key, byte[] field, byte[] value)
key - key as byte arrayfield - field to modifyvalue - value of the fieldLong hset(byte[] key, byte[] field, byte[] value)
key - key as byte arrayfield - value - Set<byte[]> hkeys(byte[] key)
key - key as byte arrayString set(byte[] key, byte[] value)
key - key as byte arrayvalue - String setex(byte[] key, int expiry, byte[] value)
key - key as byte arrayexpiry - value - Long expire(byte[] key, int value)
key - key as byte arrayvalue - void srem(byte[] key,
byte[]... member)
key - key as byte arraymember - Long sadd(byte[] key, byte[]... member)
key - key as byte arraymember - Long del(byte[]... keys)
keys - key as byte arraysBoolean exists(byte[] key)
key - key as byte arraySet<byte[]> smembers(byte[] key)
key - key as byte arraySet<byte[]> spop(byte[] key, long count)
key - key as byte arraycount - Long expireAt(byte[] key, long unixTime)
key - key as byte arrayunixTime - Long zadd(byte[] key, double score, byte[] elem)
key - key as byte arrayscore - elem - Long zrem(byte[] key, byte[]... fields)
key - key as byte arrayfields - Set<byte[]> zrangeByScore(byte[] key, double start, double end)
key - key as byte arraystart - end - Set<byte[]> zrange(byte[] key, long start, long end)
key - key as byte arraystart - end - Long persist(byte[] key)
key - key as byte arrayString rename(byte[] oldkey, byte[] newkey)
oldkey - newkey - boolean supportsMultiSpop()
true if SPOP with multiple results is supportedvoid requestFinished()
void close()
byte[] get(byte[] key)
key - key as byte arrayLong publish(byte[] channel, byte[] message)
channel - message - void startMonitoring(com.codahale.metrics.MetricRegistry metrics)
metrics - boolean isRedisException(Exception e)
true if exception was thrown by redis librarye - the exception to checktrue if exception was thrown by redis library<T> RedisFacade.ResponseFacade<T> transaction(byte[] key, RedisFacade.TransactionRunner<T> transaction)
key - key as byte array used when performing transaction on cluster to fix the node where transaction occurs.transaction - the implementation of transactionCopyright © 2018 Amadeus s.a.s.. All rights reserved.