Package com.saxonica.ee.stream

## Class AccumulatorRegistryEE

- java.lang.Object
- - net.sf.saxon.expr.accum.AccumulatorRegistry
  - - com.saxonica.ee.stream.AccumulatorRegistryEE

-     public class AccumulatorRegistryEE
      extends AccumulatorRegistry

  Static registry containing the accumulators defined within a package; the Saxon-EE subclass includes support for streamed accumulators.

- - ### Field Summary

    - ### Fields inherited from class net.sf.saxon.expr.accum.AccumulatorRegistry

      `accumulatorsByName`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `AccumulatorRegistryEE()` |

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `Sequence` | `getStreamingAccumulatorValue​(NodeInfo node, Accumulator accumulator, AccumulatorFn.Phase phase)` | Get the run-time value of a streamed accumulator
    `static void` | `registerSelectedAccumulators​(WatchManager watchManager, java.util.Set<? extends Accumulator> accumulators)` | Register all the rules for all the accumulators with a WatchManager handling events for a streaming pass over a source document

    - ### Methods inherited from class net.sf.saxon.expr.accum.AccumulatorRegistry

      `addAccumulator, getAccumulator, getAllAccumulators, getUsedAccumulators`

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

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

- - ### Constructor Detail

    - #### AccumulatorRegistryEE

          public AccumulatorRegistryEE()

  - ### Method Detail

    - #### registerSelectedAccumulators

          public static void registerSelectedAccumulators​(WatchManager watchManager,
                                                          java.util.Set<? extends Accumulator> accumulators)
                                                   throws XPathException

      Register all the rules for all the accumulators with a WatchManager handling events for a streaming pass over a source document
      Parameters:
        `watchManager` - the WatchManager with which the rules are to be registered
      Throws:
        `XPathException` - if an error occurs

    - #### getStreamingAccumulatorValue

          public Sequence getStreamingAccumulatorValue​(NodeInfo node,
                                                       Accumulator accumulator,
                                                       AccumulatorFn.Phase phase)
                                                throws XPathException

      Get the run-time value of a streamed accumulator
      Overrides:
        `getStreamingAccumulatorValue` in class `AccumulatorRegistry`
      Parameters:
        `node` - the context node
        `accumulator` - the accumulator whose value is required
        `phase` - pre-descent or post-descent
      Returns:
        the value of the accumulator, or null if the context node is not streamed
      Throws:
        `XPathException` - if a dynamic error occurs