package com.hzjt.handler;

import com.hzjt.domain.TraffAlarmRecordDelay;
import org.springframework.stereotype.Component;

import java.util.concurrent.DelayQueue;

/**
 * @author chenl
 * @version 1.0
 * @date 2020/4/9 10:31
 */
@Component
public class DelayQueueManager {
    private static final DelayQueue<TraffAlarmRecordDelay> delayQueue = new DelayQueue<>();

    public boolean pushData(TraffAlarmRecordDelay traffAlarmRecordDelay){
        return delayQueue.offer(traffAlarmRecordDelay);
    }
    public DelayQueue<TraffAlarmRecordDelay> getQueue(){
        return delayQueue;
    }


}
