|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.openstreetmap.osmosis.core.sort.common.FileBasedSort<T>
T - The object type to be sorted.public class FileBasedSort<T extends Storeable>
Allows a large number of objects to be sorted by writing them all to disk then sorting using a merge sort algorithm.
| Constructor Summary | |
|---|---|
FileBasedSort(ObjectSerializationFactory serializationFactory,
java.util.Comparator<T> comparator,
boolean useCompression)
Creates a new instance. |
|
| Method Summary | |
|---|---|
void |
add(T value)
Adds a new object to be sorted. |
ReleasableIterator<T> |
iterate()
Sorts and returns the contents of the sorter. |
void |
release()
Performs resource cleanup tasks such as closing files, or database connections. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FileBasedSort(ObjectSerializationFactory serializationFactory,
java.util.Comparator<T> comparator,
boolean useCompression)
serializationFactory - The factory defining the object serialisation implementation.comparator - The comparator to be used for sorting the results.useCompression - If true, the storage files will be compressed.| Method Detail |
|---|
public void add(T value)
value - The data object.public ReleasableIterator<T> iterate()
public void release()
release in interface Releasable
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||