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