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,
Integer timeout)
Actually acquire the lock based upon the client acquisition model
|
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.
|
void |
end()
Does nothing.
|
acquireLock, doAcquireLock, doEnqueue, doPriorityEnqueue, enqueue, getNamespace, key, priorityEnqueuepublic 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
AbstractClientdoEnqueue 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
AbstractClientdoPriorityEnqueue in class AbstractClientqueue - the queue to add the Job tojobJson - the serialized JobException - in case something goes wrongprotected boolean doAcquireLock(String lockName, String lockHolder, Integer timeout) throws Exception
AbstractClientdoAcquireLock in class AbstractClientlockName - all calls to this method will contend for a unique lock with
the name of lockNamelockHolder - a unique string used to tell if you are the current holder of
a lock for both acquisition, and extensiontimeout - seconds until the lock will expireExceptionpublic void end()
Copyright © 2011-2013. All Rights Reserved.