org.apache.storm.solr.config

## Class CountBasedCommit

- java.lang.Object
- - org.apache.storm.solr.config.CountBasedCommit

- All Implemented Interfaces:
    Serializable, SolrCommitStrategy

      public class CountBasedCommit
      extends Object
      implements SolrCommitStrategy

  Class defining a count based commit strategy. When the count reaches the commit threshold, SolrInputDocuments are committed to Solr.

  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `CountBasedCommit(int threshold)` Initializes a count based commit strategy with the specified threshold.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `commit()`
    `int` | `getCount()`
    `int` | `getThreshold()`
    `void` | `update()`

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

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

- - ### Constructor Detail

    - #### CountBasedCommit

          public CountBasedCommit(int threshold)

      Initializes a count based commit strategy with the specified threshold.

      Parameters:
        `threshold` - The commit threshold, defining when SolrInputDocuments should be committed to Solr

  - ### Method Detail

    - #### commit

          public boolean commit()

      Specified by:
        `commit` in interface `SolrCommitStrategy`

    - #### update

          public void update()

      Specified by:
        `update` in interface `SolrCommitStrategy`

    - #### getCount

          public int getCount()

    - #### getThreshold

          public int getThreshold()

Copyright © 2019 The Apache Software Foundation. All rights reserved.