package com.zjty.autotest.mq;

import java.util.concurrent.ArrayBlockingQueue;

public class QueueManager {
    private static ArrayBlockingQueue queue=new ArrayBlockingQueue(10);

    public static void put(String msg){
        try {
            queue.put(msg);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }
    public static String take(){
        try {
            String take = (String) queue.take();
            return take;
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        return null;
    }

}
