class CachingTaskCollection implements TaskCollection<T> {

  @Override
  public synchronized void close() throws IOException {
    outstandingTasks.clear();
    cache.clear();
    wrappedCollection.close();
    closed = true;
  }

  public  CachingTaskCollection(final TaskCollection<T> collection, final int maxCacheSize);
  public  CachingTaskCollection(final TaskCollection<T> collection);

}