class Window {

    public List<WindowFuture<K,R,P>> cancelAll() {
        if (this.futures.size() <= 0) {
            return null;
        }
        
        List<WindowFuture<K,R,P>> cancelled = new ArrayList<WindowFuture<K,R,P>>();
        long now = System.currentTimeMillis();
        this.lock.lock();
        try {
            // check every request this window contains and see if it's expired
            for (DefaultWindowFuture<K,R,P> future : this.futures.values()) {
                cancelled.add(future);
                future.cancelHelper(now);
            }
            
            if (cancelled.size() > 0) {
                this.futures.clear();
                // signal that a future is completed
                this.completedCondition.signalAll();
            }
        } finally {
            this.lock.unlock();
        }
        return cancelled;
    }

    public  Window(int size);
    public  Window(int size, ScheduledExecutorService executor, long monitorInterval, WindowListener<K,R,P> listener);
    public  Window(int size, ScheduledExecutorService executor, long monitorInterval, WindowListener<K,R,P> listener, String monitorThreadName);

}