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 SolrCommitStrategy
public void update()
update
in interface SolrCommitStrategy
public int getCount()
public int getThreshold()
Copyright © 2022 The Apache Software Foundation. All rights reserved.