public interface Client
| Modifier and Type | Method and Description |
|---|---|
boolean |
acquireLock(String lockName,
String lockHolder,
Integer timeout)
A non blocking lock utilizing Redis to create a lock that can be utilized by distributed servers.
|
void |
end()
Quits the connection to the Redis server.
|
void |
enqueue(String queue,
Job job)
Queues a job in a given queue to be run.
|
void |
priorityEnqueue(String queue,
Job job)
Queues a job with high priority in a given queue to be run.
|
void enqueue(String queue, Job job)
queue - the queue to add the Job tojob - the job to be enqueuedIllegalArgumentException - if the queue is null or empty or if the job is nullvoid priorityEnqueue(String queue, Job job)
queue - the queue to add the Job tojob - the job to be enqueuedIllegalArgumentException - if the queue is null or empty or if the job is nullvoid end()
boolean acquireLock(String lockName, String lockHolder, Integer timeout)
lockName - all calls to this method will contend for a unique lock with the name of lockNametimeout - seconds until the lock will expirelockHolder - a unique string used to tell if you are the current holder of a lock for both acquisition, and extensionCopyright © 2011-2013. All Rights Reserved.