All Downloads are FREE. Search and download functionalities are using the official Maven repository.

top.jfunc.common.thread.conpro.Producer Maven / Gradle / Ivy

There is a newer version: 1.8.5
Show 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 - 2024 Weber Informatics LLC | Privacy Policy