package kr.gmtc.tss.util;

import java.util.Collection;
import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.TimeUnit;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;


public class ArrayBlockingLoggingQueue<Object> extends ArrayBlockingQueue<Object> {

	private static Logger logger = LoggerFactory.getLogger(ArrayBlockingLoggingQueue.class);

	public ArrayBlockingLoggingQueue(int capacity, boolean fair,
			Collection<? extends Object> c) {
		super(capacity, fair, c);
		// TODO Auto-generated constructor stub
	}

	public ArrayBlockingLoggingQueue(int capacity, boolean fair) {
		super(capacity, fair);
		// TODO Auto-generated constructor stub
	}

	public ArrayBlockingLoggingQueue(int capacity) {
		super(capacity);
		// TODO Auto-generated constructor stub
	}
	
	@Override
	public synchronized boolean add(Object e) {
		// TODO Auto-generated method stub
		logger.debug(e+"");
		return super.add(e);
	}
	
	@Override
	public synchronized boolean offer(Object e) {
		// TODO Auto-generated method stub
		logger.debug(e+"");
		return super.offer(e);
	}
	
	@Override
	public synchronized boolean offer(Object e, long timeout, TimeUnit unit) throws InterruptedException {
		// TODO Auto-generated method stub
		logger.debug(e+"");
		return super.offer(e, timeout, unit);
	}
	

}
