package com.elab.core.async.store;

import com.elab.core.async.SchedulingTaskExecutor;

import java.util.ArrayList;
import java.util.List;
import java.util.Queue;
import java.util.concurrent.ArrayBlockingQueue;

/**
 * 任务执行队列
 *
 * @author ： liukx
 * @time ： 2020/8/6 - 13:46
 */
public class TaskExecutorQueue {

    private Queue<TaskExecutorDecoration> realTimeQueue;

    private List<SchedulingTaskExecutor> schedulingList = new ArrayList<>();

    private Integer queueSize = 100;

    public TaskExecutorQueue(Integer queueSize) {
        this.queueSize = queueSize;
        this.realTimeQueue = new ArrayBlockingQueue<>(this.queueSize);
    }

    public void setRealTimeQueue(Queue<TaskExecutorDecoration> realTimeQueue) {
        this.realTimeQueue = realTimeQueue;
    }

    public void setSchedulingList(List<SchedulingTaskExecutor> schedulingList) {
        this.schedulingList = schedulingList;
    }

    public Queue<TaskExecutorDecoration> getRealTimeQueue() {
        return realTimeQueue;
    }

    public List<SchedulingTaskExecutor> getSchedulingList() {
        return schedulingList;
    }


}
