
top.jfunc.common.thread.conpro.Producer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of common-utils Show documentation
Show all versions of common-utils Show documentation
common utils like IOUtil,StrUtil,HoldProcessor.etc.
The newest version!
package top.jfunc.common.thread.conpro;
import java.util.concurrent.BlockingQueue;
/**
* @author xiongshiyan
* 通用的消费者
*/
public class Producer {
public static void offer(BlockingQueue blockingQueue , T t){
blockingQueue.offer(t);
}
public static void offer(String pipelineName , T t){
BlockingQueue blockingQueue = QueueHolder.getBlockingQueue(pipelineName);
blockingQueue.offer(t);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy