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.
| Constructor and Description |
|---|
CountBasedCommit(int threshold)
Initializes a count based commit strategy with the specified threshold.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
commit() |
int |
getCount() |
int |
getThreshold() |
void |
update() |
public CountBasedCommit(int threshold)
Initializes a count based commit strategy with the specified threshold.
threshold - The commit threshold, defining when SolrInputDocuments should be committed to Solrpublic boolean commit()
commit in interface SolrCommitStrategypublic void update()
update in interface SolrCommitStrategypublic int getCount()
public int getThreshold()
Copyright © 2021 The Apache Software Foundation. All rights reserved.