com.github.phantomthief.jedis.poper.JedisStringQueuePoper Maven / Gradle / Ivy
The newest version!
/**
*
*/
package com.github.phantomthief.jedis.poper;
import java.util.function.Function;
import java.util.function.Supplier;
import redis.clients.jedis.ShardedJedisPool;
/**
* @author w.vela
*/
public class JedisStringQueuePoper extends AbsJedisQueuePoper {
private static final int DEFAULT_WAIT = 2;
public JedisStringQueuePoper(String queueKey, Supplier jedisFactory) {
this(queueKey, jedisFactory, DEFAULT_WAIT);
}
/**
* @param queueKey
* @param jedisFactory
* @param wait
*/
public JedisStringQueuePoper(String queueKey, Supplier jedisFactory, int wait) {
super(queueKey, jedisFactory, (j, k) -> j.brpop(wait, k), Function.identity());
}
}