Class SplunkConnectionImpl.CountingSearchResultListener
- java.lang.Object
-
- org.apache.calcite.adapter.splunk.search.SplunkConnectionImpl.CountingSearchResultListener
-
- All Implemented Interfaces:
SearchResultListener
- Enclosing class:
- SplunkConnectionImpl
public static class SplunkConnectionImpl.CountingSearchResultListener extends java.lang.Object implements SearchResultListener
Implementation ofSearchResultListener
interface that just counts the results.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) java.lang.String[]
fieldNames
(package private) boolean
print
(package private) int
resultCount
-
Constructor Summary
Constructors Constructor Description CountingSearchResultListener(boolean print)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getResultCount()
boolean
processSearchResult(java.lang.String[] values)
Handles a record from a search result.void
setFieldNames(java.lang.String[] fieldNames)
-
-
-
Method Detail
-
setFieldNames
public void setFieldNames(java.lang.String[] fieldNames)
- Specified by:
setFieldNames
in interfaceSearchResultListener
-
processSearchResult
public boolean processSearchResult(java.lang.String[] values)
Description copied from interface:SearchResultListener
Handles a record from a search result.- Specified by:
processSearchResult
in interfaceSearchResultListener
- Parameters:
values
- Values of the record- Returns:
- true to continue parsing, false otherwise
-
getResultCount
public int getResultCount()
-
-