public final class JedisUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static boolean |
canUseAsDelayedQueue(redis.clients.jedis.Jedis jedis,
String key)
Determines if the queue identified by the given key can be used as a delayed queue.
|
static boolean |
ensureJedisConnection(redis.clients.jedis.Jedis jedis)
Ensure that the given connection is established.
|
static boolean |
isDelayedQueue(redis.clients.jedis.Jedis jedis,
String key)
Determines if the queue identified by the given key is a delayed queue.
|
static boolean |
isKeyUsed(redis.clients.jedis.Jedis jedis,
String key)
Determines if the queue identified by the given key is used.
|
static boolean |
isRegularQueue(redis.clients.jedis.Jedis jedis,
String key)
Determines if the queue identified by the given key is a regular queue.
|
static boolean |
reconnect(redis.clients.jedis.Jedis jedis,
int reconAttempts,
long reconnectSleepTime)
Attempt to reconnect to Redis.
|
static boolean |
testJedisConnection(redis.clients.jedis.Jedis jedis)
Test if a connection is valid.
|
public static final String PONG
public static boolean ensureJedisConnection(redis.clients.jedis.Jedis jedis)
jedis - a connection to Redispublic static boolean testJedisConnection(redis.clients.jedis.Jedis jedis)
jedis - a connection to Redispublic static boolean reconnect(redis.clients.jedis.Jedis jedis,
int reconAttempts,
long reconnectSleepTime)
jedis - the connection to RedisreconAttempts - number of times to attempt to reconnect before giving upreconnectSleepTime - time in milliseconds to wait between attemptspublic static boolean isRegularQueue(redis.clients.jedis.Jedis jedis,
String key)
jedis - connection to Rediskey - the key that identifies a queuepublic static boolean isDelayedQueue(redis.clients.jedis.Jedis jedis,
String key)
jedis - connection to Rediskey - the key that identifies a queuepublic static boolean isKeyUsed(redis.clients.jedis.Jedis jedis,
String key)
jedis - connection to Rediskey - the key that identifies a queuepublic static boolean canUseAsDelayedQueue(redis.clients.jedis.Jedis jedis,
String key)
jedis - connection to Rediskey - the key that identifies a queueCopyright © 2011-2015. All Rights Reserved.