org.apache.solr.search.facet

## Class SlotAcc

- java.lang.Object
- - org.apache.solr.search.facet.SlotAcc

- All Implemented Interfaces:
    Closeable, AutoCloseable

      public abstract class SlotAcc
      extends Object
      implements Closeable

  Accumulates statistics separated by a slot number. There is a separate statistic per slot. The slot is usually an ordinal into a set of values, e.g. tracking a count frequency per term. Sometimes there doesn't need to be a slot distinction, in which case there is just one nominal slot.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `SlotAcc.Resizer`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected org.apache.solr.search.facet.FacetContext` | `fcontext`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SlotAcc(org.apache.solr.search.facet.FacetContext fcontext)`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()`
    `int` | `collect(DocSet docs, int slot)`
    `abstract void` | `collect(int doc, int slot)`
    `abstract int` | `compare(int slotA, int slotB)`
    `abstract Object` | `getValue(int slotNum)`
    `abstract void` | `reset()`
    `abstract void` | `resize(SlotAcc.Resizer resizer)`
    `void` | `setNextReader(LeafReaderContext readerContext)`
    `void` | `setValues(SimpleOrderedMap<Object> bucket, int slotNum)`

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

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

- - ### Field Detail

    - #### fcontext

          protected final org.apache.solr.search.facet.FacetContext fcontext

  - ### Constructor Detail

    - #### SlotAcc

          public SlotAcc(org.apache.solr.search.facet.FacetContext fcontext)

  - ### Method Detail

    - #### setNextReader

          public void setNextReader(LeafReaderContext readerContext)
                             throws IOException

      Throws:
        `IOException`

    - #### collect

          public abstract void collect(int doc,
                                       int slot)
                                throws IOException

      Throws:
        `IOException`

    - #### collect

          public int collect(DocSet docs,
                             int slot)
                      throws IOException

      Throws:
        `IOException`

    - #### compare

          public abstract int compare(int slotA,
                                      int slotB)

    - #### getValue

          public abstract Object getValue(int slotNum)
                                   throws IOException

      Throws:
        `IOException`

    - #### setValues

          public void setValues(SimpleOrderedMap<Object> bucket,
                                int slotNum)
                         throws IOException

      Throws:
        `IOException`

    - #### reset

          public abstract void reset()

    - #### resize

          public abstract void resize(SlotAcc.Resizer resizer)

    - #### close

          public void close()
                     throws IOException

      Specified by:
        `close` in interface `Closeable`
      Specified by:
        `close` in interface `AutoCloseable`
      Throws:
        `IOException`

Copyright © 2000-2016 Apache Software Foundation. All Rights Reserved.