class TransferQueue {

    public void resize(int newsize) {
        if(log.isDebugEnabled()) {
            log.debug(String.format("Resize queue to %d", newsize));
        }
        final int drained = running.drainTo(temporary);
        if(log.isDebugEnabled()) {
            log.debug(String.format("Drained %d elements", drained));
        }
        running.clear();
        running = new ArrayBlockingQueue<Transfer>(newsize);
        this.poll();
    }

    public  TransferQueue();
    public  TransferQueue(final int size);

}