public class ClientPoolImpl extends AbstractClient
| Constructor and Description |
|---|
ClientPoolImpl(Config config,
redis.clients.util.Pool<redis.clients.jedis.Jedis> jedisPool)
Create a ClientPoolImpl.
|
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
doAcquireLock(String lockName,
String lockHolder,
int timeout)
Actually acquire the lock based upon the client acquisition model.
|
protected void |
doDelayedEnqueue(String queue,
String msg,
long future) |
protected void |
doEnqueue(String queue,
String jobJson)
Actually enqueue the serialized job.
|
protected void |
doPriorityEnqueue(String queue,
String jobJson)
Actually enqueue the serialized job with high priority.
|
protected void |
doRemoveDelayedEnqueue(String queue,
String msg) |
void |
end()
Quits the connection to the Redis server.
|
acquireLock, delayedEnqueue, doAcquireLock, doDelayedEnqueue, doEnqueue, doPriorityEnqueue, doRemoveDelayedEnqueue, enqueue, getNamespace, key, priorityEnqueue, removeDelayedEnqueuepublic ClientPoolImpl(Config config, redis.clients.util.Pool<redis.clients.jedis.Jedis> jedisPool)
config - used to get the namespace for key creationjedisPool - the connection poolprotected void doEnqueue(String queue, String jobJson) throws Exception
doEnqueue in class AbstractClientqueue - the queue to add the Job tojobJson - the serialized JobException - in case something goes wrongprotected void doPriorityEnqueue(String queue, String jobJson) throws Exception
doPriorityEnqueue in class AbstractClientqueue - the queue to add the Job tojobJson - the serialized JobException - in case something goes wrongprotected boolean doAcquireLock(String lockName, String lockHolder, int timeout) throws Exception
doAcquireLock in class AbstractClientlockName - the name of the lock to acquirelockHolder - a unique string identifying the callertimeout - number of seconds until the lock will expireException - in case something goes wrongpublic void end()
protected void doDelayedEnqueue(String queue, String msg, long future) throws Exception
doDelayedEnqueue in class AbstractClientExceptionprotected void doRemoveDelayedEnqueue(String queue, String msg) throws Exception
doRemoveDelayedEnqueue in class AbstractClientExceptionCopyright © 2011-2015. All Rights Reserved.