public class FailureDAORedisImpl extends Object implements FailureDAO
| Constructor and Description |
|---|
FailureDAORedisImpl(Config config,
redis.clients.util.Pool<redis.clients.jedis.Jedis> jedisPool)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clear the list of failures.
|
protected void |
enqueue(redis.clients.jedis.Jedis jedis,
String queue,
Job job) |
long |
getCount() |
List<JobFailure> |
getFailures(long offset,
long count) |
void |
remove(long index)
Remove a failure from the list.
|
Date |
requeue(long index)
Re-queue a job for execution.
|
public FailureDAORedisImpl(Config config, redis.clients.util.Pool<redis.clients.jedis.Jedis> jedisPool)
config - the Jesque configurationjedisPool - the connection pool to Redispublic long getCount()
getCount in interface FailureDAOpublic List<JobFailure> getFailures(long offset, long count)
getFailures in interface FailureDAOoffset - offset into the failurescount - number of failures to returnpublic void clear()
clear in interface FailureDAOpublic Date requeue(long index)
requeue in interface FailureDAOindex - the index into the failure listpublic void remove(long index)
remove in interface FailureDAOindex - the index of the failure to removeprotected void enqueue(redis.clients.jedis.Jedis jedis,
String queue,
Job job)
throws IOException
IOExceptionCopyright © 2011-2015. All Rights Reserved.