Search in sources :

Example 1 with DocumentList

use of org.openntf.domino.iterators.DocumentList in project org.openntf.domino by OpenNTF.

the class DocumentSorter method sort.

public DocumentCollection sort() {
    long startMemory = Runtime.getRuntime().freeMemory();
    _sort();
    int[] nids = new int[dataset_.length];
    // System.out.println("Beginning merge of " + dataset_.length + " DocumentDatas");
    for (int i = 0; i < nids.length; i++) {
        nids[i] = dataset_[i].nid_;
    }
    DocumentCollection result = new DocumentList(nids, database_);
    // for (DocumentData data : dataset_) {
    // result.merge(data.nid_);
    // }
    // System.out.println("Completed merge for a result size of " + result.getCount());
    long endMemory = Runtime.getRuntime().freeMemory();
    if (debug) {
        System.out.println("Total memory consumed: " + (endMemory - startMemory) / 1024 + "KB");
    }
    return result;
}
Also used : DocumentList(org.openntf.domino.iterators.DocumentList) DocumentCollection(org.openntf.domino.DocumentCollection)

Aggregations

DocumentCollection (org.openntf.domino.DocumentCollection)1 DocumentList (org.openntf.domino.iterators.DocumentList)1