@Override
    public Date requeue(final long index) {
        Date retryDate = null;
        final List<JobFailure> failures = getFailures(index, 1);
        if (!failures.isEmpty()) {
            retryDate = PoolUtils.doWorkInPoolNicely(this.jedisPool, new PoolWork<Jedis, Date>() {
                /**
                 * {@inheritDoc}
                 */
                @Override
                public Date doWork(final Jedis jedis) throws Exception {
                    final Date retriedAt = new Date();
                    final JobFailure failure = failures.get(0);
                    failure.setRetriedAt(retriedAt);
                    jedis.lset(key(FAILED), index, ObjectMapperFactory.get().writeValueAsString(failure));
                    enqueue(jedis, failure.getQueue(), failure.getPayload());
                    return retriedAt;
                }
            });
        }
        return retryDate;
    }
@ Override public Date requeue ( final long index ) { Date retryDate = null ; final List < JobFailure > failures = getFailures ( index , 1 ) ; if ( ! failures . isEmpty ( ) ) { retryDate = PoolUtils . doWorkInPoolNicely ( this . jedisPool , new PoolWork < Jedis , Date > ( ) { @ Override public Date doWork ( final Jedis jedis ) throws Exception { final Date retriedAt = new Date ( ) ; final JobFailure failure = failures . get ( 0 ) ; failure . setRetriedAt ( retriedAt ) ; jedis . lset ( key ( FAILED ) , index , ObjectMapperFactory . get ( ) . writeValueAsString ( failure ) ) ; enqueue ( jedis , failure . getQueue ( ) , failure . getPayload ( ) ) ; return retriedAt ; } } ) ; } return retryDate ; }
{@inheritDoc}