public class SortingRamSpool<T> extends Object implements Spool<T>
Constructor and Description |
---|
SortingRamSpool() |
SortingRamSpool(Comparator<T> c) |
Modifier and Type | Method and Description |
---|---|
Accumulator<T> |
accumulator()
Returns an Accumulator for the spool file.
|
Iterator<T> |
iterator()
Returns an Iterable over the spool file.
|
public SortingRamSpool()
public SortingRamSpool(Comparator<T> c)
public Iterator<T> iterator()
Spool
Depending on the implementation, this method may be called only once per Spool instance, or it may be called repeatedly. Similarly, with some Spool implementations, attempts to append to the SpoolFile after calling iterator() may fail fast with a ConcurrentModificationException.
public Accumulator<T> accumulator() throws StorageException
Spool
Depending on the implementation, this method may be called only once per Spool instance, or it may be called repeatedly. Similarly, with some Spool implementations, attempts to append to the SpoolFile after calling iterator() may fail fast with a ConcurrentModificationException.
accumulator
in interface Accumulable<T>
accumulator
in interface Spool<T>
Accumulator
StorageException
Copyright © 2016 The Apache Software Foundation. All rights reserved.