org.modeshape.jcr.spi.index

## Interface ResultWriter

- All Known Implementing Classes:
    QuerySources.BatchWriter

      @NotThreadSafe
      public interface ResultWriter

  A writer passed by ModeShape to a `Filter.Results` instance when the query engine needs additional results for the query.

  Instances of this type are created by ModeShape and passed into the `Filter.Results.getNextBatch(ResultWriter, int)` method. Thus, providers do not need to implement this interface (except maybe for testing purposes).

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `add(Iterable<NodeKey> nodeKeys, float score)` Add to the current batch a series of node keys with the same score for each node key.
    `void` | `add(Iterator<NodeKey> nodeKeys, float score)` Add to the current batch a series of node keys with the same score for each node key.
    `void` | `add(NodeKey nodeKey, float score)` Add to the current batch a single node key with a score.

- - ### Method Detail

    - #### add

          void add(NodeKey nodeKey,
                 float score)

      Add to the current batch a single node key with a score.
      Parameters:
        `nodeKey` - the node key; may not be null
        `score` - the score; must be positive

    - #### add

          void add(Iterable<NodeKey> nodeKeys,
                 float score)

      Add to the current batch a series of node keys with the same score for each node key.
      Parameters:
        `nodeKeys` - the node keys; may not be null
        `score` - the score; must be positive

    - #### add

          void add(Iterator<NodeKey> nodeKeys,
                 float score)

      Add to the current batch a series of node keys with the same score for each node key.
      Parameters:
        `nodeKeys` - the node keys; may not be null
        `score` - the score; must be positive

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