public abstract class CountCollector extends ReductionDataCollector<CountCollector.CountData>
| Modifier and Type | Class and Description |
|---|---|
static class |
CountCollector.CountData |
static class |
CountCollector.ExpressionCountCollector
Represents a
count(expr) expression. |
static class |
CountCollector.TotalCountCollector
Represents a
count() expression. |
| Modifier and Type | Field and Description |
|---|---|
static String |
name |
collectionTargets, ioData, lastingTargets| Constructor and Description |
|---|
CountCollector(String exprStr) |
| Modifier and Type | Method and Description |
|---|---|
long |
count()
The number of Solr Documents for which the given analytics expression exists.
|
long |
docCount()
The number of Solr Documents used in this reduction.
|
String |
getExpressionStr()
The unique expression string of the reduction data collector, given all inputs and parameters.
|
String |
getName()
Get the name of the reduction data collector.
|
CountCollector.CountData |
newData()
A clean slate to start a new reduction.
|
void |
setData(ReductionData data)
Finalize the reduction with the collected data stored in the parameter.
|
void |
setMergedData(ReductionData data)
Finalize the reduction with the merged data stored in the parameter.
|
void |
submitReservations(Consumer<ReductionDataReservation<?,?>> consumer)
Submits the data reservations needed for this data collector.
|
addCollectTarget, addLastingCollectTarget, apply, clearLastingCollectTargets, collect, collectAndApply, dataIO, newDataIO, newDataTargetpublic static final String name
public CountCollector(String exprStr)
public long count()
public long docCount()
public CountCollector.CountData newData()
ReductionDataCollectornewData in class ReductionDataCollector<CountCollector.CountData>public void submitReservations(Consumer<ReductionDataReservation<?,?>> consumer)
ReductionDataCollectorsubmitReservations in class ReductionDataCollector<CountCollector.CountData>consumer - the consumer which the reservations are submitted topublic void setMergedData(ReductionData data)
ReductionDataCollectorReductionFunctions that use this
data collector act like regular AnalyticsValue classes that
can be accessed through their get<value-type> methods.
(FOR CLOUD)setMergedData in class ReductionDataCollector<CountCollector.CountData>data - the merged data to compute a reduction forpublic void setData(ReductionData data)
ReductionDataCollectorReductionFunctions that use this
data collector act like regular AnalyticsValue classes that
can be accessed through their get<value-type> methods.
(FOR SINGLE-SHARD)setData in class ReductionDataCollector<CountCollector.CountData>data - the collected data to compute a reduction forpublic String getName()
ReductionDataCollectorgetName in class ReductionDataCollector<CountCollector.CountData>public String getExpressionStr()
ReductionDataCollectorReductionDataCollector syncing. Since the string should be unique,
only one of expression is kept.getExpressionStr in class ReductionDataCollector<CountCollector.CountData>Copyright © 2000-2020 Apache Software Foundation. All Rights Reserved.