![JAR search and dependency download from the Maven repository](/logo.png)
com.github.phantomthief.jedis.poper.JedisIntQueuePoper Maven / Gradle / Ivy
The newest version!
/**
*
*/
package com.github.phantomthief.jedis.poper;
import java.util.function.Supplier;
import org.apache.commons.lang3.math.NumberUtils;
import redis.clients.jedis.ShardedJedisPool;
/**
* @author w.vela
*/
public class JedisIntQueuePoper extends AbsJedisQueuePoper {
private static final int DEFAULT_WAIT = 2;
public JedisIntQueuePoper(String queueKey, Supplier jedisFactory) {
this(queueKey, jedisFactory, DEFAULT_WAIT);
}
/**
* @param queueKey
* @param jedisFactory
* @param wait
*/
public JedisIntQueuePoper(String queueKey, Supplier jedisFactory, int wait) {
super(queueKey, jedisFactory, (j, k) -> j.brpop(wait, k), NumberUtils::toInt);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy