org.modeshape.jcr.query.engine.process

## Class SortingSequence

- java.lang.Object
- - org.modeshape.jcr.query.NodeSequence
  - - org.modeshape.jcr.query.engine.process.DelegatingSequence
    - - org.modeshape.jcr.query.engine.process.BufferingSequence
      - - org.modeshape.jcr.query.engine.process.SortingSequence

-     public class SortingSequence
      extends BufferingSequence

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.modeshape.jcr.query.NodeSequence

      `NodeSequence.AlternateSizeBatch, NodeSequence.Batch, NodeSequence.LimitBatch, NodeSequence.MultiWidthBatch, NodeSequence.Restartable, NodeSequence.RowAccessor, NodeSequence.RowFilter, NodeSequence.SingleWidthBatch`

  - ### Field Summary

    - ### Fields inherited from class org.modeshape.jcr.query.engine.process.BufferingSequence

      `buffer, cache, extractor, logger, remainingRowCount, rowFactory, trace, width, workspaceName`

    - ### Fields inherited from class org.modeshape.jcr.query.engine.process.DelegatingSequence

      `delegate`

    - ### Fields inherited from class org.modeshape.jcr.query.NodeSequence

      `LOGGER, NO_PASS_ROW_FILTER, PASS_ROW_FILTER`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SortingSequence(String workspaceName, NodeSequence delegate, RowExtractors.ExtractFromRow extractor, BufferManager bufferMgr, CachedNodeSupplier nodeCache, boolean pack, boolean useHeap, boolean allowDuplicates, NullOrder nullOrder)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()` Signal that this node sequence is no longer needed.
    `long` | `getRowCount()` Get the number of rows in this sequence.
    `protected Iterator<BufferedRows.BufferedRow>` | `initialize()` Initialize this node sequence only the first time that `nextBatch()` is called.
    `NodeSequence.Batch` | `nextBatch()` Get the next batch of `NodeKey` instances.
    `String` | `toString()`

    - ### Methods inherited from class org.modeshape.jcr.query.engine.process.BufferingSequence

      `batchFrom, createRow, isEmpty, loadAll, rowCount`

    - ### Methods inherited from class org.modeshape.jcr.query.engine.process.DelegatingSequence

      `width`

    - ### Methods inherited from class org.modeshape.jcr.query.NodeSequence

      `append, batchFilteredWith, batchOf, batchOf, batchOf, batchOfKeys, batchOfKeys, batchOfKeys, batchOfKeys, batchWithCount, copy, emptyBatch, emptySequence, filter, keyFor, limit, limit, merging, requireBoth, requireEither, skip, withBatch, withBatches, withBatches, withNode, withNodeKeys, withNodeKeys, withNodeKeys, withNodeKeys, withNodes, withNodes`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### SortingSequence

          public SortingSequence(String workspaceName,
                         NodeSequence delegate,
                         RowExtractors.ExtractFromRow extractor,
                         BufferManager bufferMgr,
                         CachedNodeSupplier nodeCache,
                         boolean pack,
                         boolean useHeap,
                         boolean allowDuplicates,
                         NullOrder nullOrder)

  - ### Method Detail

    - #### getRowCount

          public long getRowCount()

      Description copied from class: `NodeSequence`
      Get the number of rows in this sequence. If the actual number of rows is not known, this method returns -1.
      Overrides:
        `getRowCount` in class `DelegatingSequence`
      Returns:
        the number of rows, or -1 if the number of rows is not known or cannot be found with significant overhead

    - #### nextBatch

          public NodeSequence.Batch nextBatch()

      Description copied from class: `NodeSequence`
      Get the next batch of `NodeKey` instances.
      Overrides:
        `nextBatch` in class `DelegatingSequence`
      Returns:
        the next batch, or null if there are no more batches.

    - #### initialize

          protected Iterator<BufferedRows.BufferedRow> initialize()

      Initialize this node sequence only the first time that `nextBatch()` is called.
      Returns:
        the iterator over the buffered rows in this sequence; may be null if this sequence is empty

    - #### close

          public void close()

      Description copied from class: `NodeSequence`
      Signal that this node sequence is no longer needed.
      Overrides:
        `close` in class `BufferingSequence`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

Copyright © 2008-2014 JBoss, a division of Red Hat. All Rights Reserved.