class BufferedFileBackedSortedSet implements SortedSet<E> {

    @Override
    public Iterator<E> iterator() {
        // first lets compact down the sets if needed
        try {
            // if we have any persisted sets, then ensure we are persisted
            if (set.getSets().size() > 1) {
                persist();
            }
        } catch (IOException ioe) {
            throw new RuntimeException("Unable to persist or compact file backed sorted set", ioe);
        }
        return set.iterator();
    }

    public  BufferedFileBackedSortedSet(BufferedFileBackedSortedSet<E> other);
    public  BufferedFileBackedSortedSet(List<SortedSetFileHandlerFactory> handlerFactories);
    public  BufferedFileBackedSortedSet(List<SortedSetFileHandlerFactory> handlerFactories, FileSortedSet.FileSortedSetFactory<E> setFactory);
    public  BufferedFileBackedSortedSet(Comparator<? super E> comparator, List<SortedSetFileHandlerFactory> handlerFactories);
    public  BufferedFileBackedSortedSet(Comparator<? super E> comparator, List<SortedSetFileHandlerFactory> handlerFactories,
                    FileSortedSet.FileSortedSetFactory<E> setFactory);
    public  BufferedFileBackedSortedSet(Comparator<? super E> comparator, int bufferPersistThreshold, int maxOpenFiles, int numRetries,
                    List<SortedSetFileHandlerFactory> handlerFactories);
    public  BufferedFileBackedSortedSet(Comparator<? super E> comparator, int bufferPersistThreshold, int maxOpenFiles, int numRetries,
                    List<SortedSetFileHandlerFactory> handlerFactories, FileSortedSet.FileSortedSetFactory<E> setFactory);

}