class FIFOScheduler implements Scheduler {
	
	private static Log log = LogFactory.getLog(FIFOScheduler.class);

	private LinkedBlockingQueue<HttpRequest> starQueue;
	
	private ConcurrentLinkedQueue<HttpRequest> queue;
	
	private ReentrantLock outLock;
	
	public FIFOScheduler() {
		starQueue = new LinkedBlockingQueue<HttpRequest>();
		queue = new ConcurrentLinkedQueue<HttpRequest>();
		outLock = new ReentrantLock();
	}
	
	/*@Override
	public void start(List<HttpRequest> requests) {
		try {
			for(HttpRequest request : requests) {
				if(StringUtils.isNotEmpty(request.getUrl())) {
					starQueue.put(request);
					if(log.isDebugEnabled()) {
						log.debug("<===[start]"+request.getUrl());
					}
				}
			}
		} catch (InterruptedException e) {
			e.printStackTrace();
		}
	}*/
	
	/**
	 * 入队列，超过边界会阻塞等待
	 */
	@Override
	public void into(HttpRequest request) {
		if(request == null) {
			return;
		}
		if(queue.offer(request)) {
			if(log.isDebugEnabled()) {
				log.debug("<==="+request.getUrl());
			}
		} else {
			log.error(request.getUrl());
		}
	}

	/**
	 * 出队列，队列为空会阻塞等待
	 */
	@Override
	public HttpRequest out() {<FILL_FUNCTION_BODY>}
}

		outLock.lock();
		try {
			HttpRequest request = queue.poll();
			if(request == null) {
					request = starQueue.take();
					if(log.isDebugEnabled()) {
						log.debug("[start]===>"+request.getUrl());
					}
					starQueue.put(request);
					if(log.isDebugEnabled()) {
						log.debug("<===[start]"+request.getUrl());
					}
					return request;
			} else {
				if(log.isDebugEnabled()) {
					log.debug("===>"+request.getUrl());
				}
				return request;
			}
		} catch (InterruptedException e) {
			e.printStackTrace();
			return null;
		} finally {
			outLock.unlock();
		}
	
<no_super_class>