org.modeshape.jcr.query.engine

## Class QuerySources.BatchWriter

- java.lang.Object
- - org.modeshape.jcr.query.engine.QuerySources.BatchWriter

- All Implemented Interfaces:
    ResultWriter
  Enclosing class:
    QuerySources

      protected static class QuerySources.BatchWriter
      extends Object
      implements ResultWriter

- - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `QuerySources.BatchWriter(int batchSize, String workspaceName, RepositoryCache repository)`

  - ### 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.
    `protected boolean` | `consumeOperation(Filter.Results operation)`
    `protected NodeSequence.Batch` | `convertToBatch(boolean isLast)`
    `NodeSequence.Batch` | `popPreloadedBatch()`
    `long` | `rowCount()`

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

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

- - ### Constructor Detail

    - #### QuerySources.BatchWriter

          protected QuerySources.BatchWriter(int batchSize,
                                  String workspaceName,
                                  RepositoryCache repository)

  - ### Method Detail

    - #### add

          public void add(NodeKey nodeKey,
                 float score)

      Description copied from interface: `ResultWriter`
      Add to the current batch a single node key with a score.
      Specified by:
        `add` in interface `ResultWriter`
      Parameters:
        `nodeKey` - the node key; may not be null
        `score` - the score; must be positive

    - #### add

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

      Description copied from interface: `ResultWriter`
      Add to the current batch a series of node keys with the same score for each node key.
      Specified by:
        `add` in interface `ResultWriter`
      Parameters:
        `nodeKeys` - the node keys; may not be null
        `score` - the score; must be positive

    - #### add

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

      Description copied from interface: `ResultWriter`
      Add to the current batch a series of node keys with the same score for each node key.
      Specified by:
        `add` in interface `ResultWriter`
      Parameters:
        `nodeKeys` - the node keys; may not be null
        `score` - the score; must be positive

    - #### popPreloadedBatch

          public NodeSequence.Batch popPreloadedBatch()

    - #### rowCount

          public long rowCount()

    - #### consumeOperation

          protected boolean consumeOperation(Filter.Results operation)

    - #### convertToBatch

          protected NodeSequence.Batch convertToBatch(boolean isLast)

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