public interface Client
| Modifier and Type | Method and Description |
|---|---|
boolean |
acquireLock(String lockName,
String lockHolder,
int timeout)
Acquire a non-blocking distributed lock.
|
void |
delayedEnqueue(String queue,
Job job,
long future)
Queues a job in a given queue to be run in the future.
|
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 |
removeDelayedEnqueue(String queue,
Job job)
Removes a queued future job.
|
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, int timeout)
lockName - the name of the lock to acquiretimeout - number of seconds until the lock will expirelockHolder - a unique string identifying the callervoid delayedEnqueue(String queue, Job job, long future)
queue - the queue to add the Job tojob - the job to be enqueuedfuture - timestamp when the job will runIllegalArgumentException - if the queue is null or empty, if the job is null or if the
timestamp is not in the futurevoid removeDelayedEnqueue(String queue, Job job)
queue - the queue to remove the Job fromjob - the job to be removedIllegalArgumentException - if the queue is null or empty, if the job is nullCopyright © 2011-2015. All Rights Reserved.