Class MaxCollector.DoubleMaxCollector
- java.lang.Object
-
- org.apache.solr.analytics.function.reduction.data.ReductionDataCollector<T>
-
- org.apache.solr.analytics.function.reduction.data.MaxCollector<MaxCollector.DoubleMaxCollector.MaxData>
-
- org.apache.solr.analytics.function.reduction.data.MaxCollector.DoubleMaxCollector
-
- Enclosing class:
- MaxCollector<T extends ReductionData>
public static class MaxCollector.DoubleMaxCollector extends MaxCollector<MaxCollector.DoubleMaxCollector.MaxData>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMaxCollector.DoubleMaxCollector.MaxData-
Nested classes/interfaces inherited from class org.apache.solr.analytics.function.reduction.data.MaxCollector
MaxCollector.DoubleMaxCollector, MaxCollector.FloatMaxCollector, MaxCollector.IntMaxCollector, MaxCollector.LongMaxCollector, MaxCollector.StringMaxCollector
-
-
Field Summary
-
Fields inherited from class org.apache.solr.analytics.function.reduction.data.MaxCollector
name
-
Fields inherited from class org.apache.solr.analytics.function.reduction.data.ReductionDataCollector
collectionTargets, ioData, lastingTargets
-
-
Constructor Summary
Constructors Constructor Description DoubleMaxCollector(DoubleValueStream param)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidapply(MaxCollector.DoubleMaxCollector.MaxData data)Apply the collected info to the given reduction data.voidcollect()Collect the information from current Solr Document.doublemax()Returns the max value of the set data.MaxCollector.DoubleMaxCollector.MaxDatanewData()A clean slate to start a new reduction.voidsetData(ReductionData data)Finalize the reduction with the collected data stored in the parameter.voidsetMergedData(ReductionData data)Finalize the reduction with the merged data stored in the parameter.voidsubmitReservations(Consumer<ReductionDataReservation<?,?>> consumer)Submits the data reservations needed for this data collector.-
Methods inherited from class org.apache.solr.analytics.function.reduction.data.MaxCollector
exists, getExpressionStr, getName
-
Methods inherited from class org.apache.solr.analytics.function.reduction.data.ReductionDataCollector
addCollectTarget, addLastingCollectTarget, clearLastingCollectTargets, collectAndApply, dataIO, newDataIO, newDataTarget
-
-
-
-
Constructor Detail
-
DoubleMaxCollector
public DoubleMaxCollector(DoubleValueStream param)
-
-
Method Detail
-
newData
public MaxCollector.DoubleMaxCollector.MaxData newData()
Description copied from class:ReductionDataCollectorA clean slate to start a new reduction.- Specified by:
newDatain classReductionDataCollector<MaxCollector.DoubleMaxCollector.MaxData>- Returns:
- the new reduction data
-
max
public double max()
Returns the max value of the set data.- Returns:
- the max
-
collect
public void collect()
Description copied from class:ReductionDataCollectorCollect the information from current Solr Document.- Overrides:
collectin classReductionDataCollector<MaxCollector.DoubleMaxCollector.MaxData>
-
apply
protected void apply(MaxCollector.DoubleMaxCollector.MaxData data)
Description copied from class:ReductionDataCollectorApply the collected info to the given reduction data. Should always be called after aReductionDataCollector.collect()call.- Specified by:
applyin classReductionDataCollector<MaxCollector.DoubleMaxCollector.MaxData>- Parameters:
data- reduction data to apply collected info to
-
submitReservations
public void submitReservations(Consumer<ReductionDataReservation<?,?>> consumer)
Description copied from class:ReductionDataCollectorSubmits the data reservations needed for this data collector.- Specified by:
submitReservationsin classReductionDataCollector<MaxCollector.DoubleMaxCollector.MaxData>- Parameters:
consumer- the consumer which the reservations are submitted to
-
setMergedData
public void setMergedData(ReductionData data)
Description copied from class:ReductionDataCollectorFinalize the reduction with the merged data stored in the parameter. Once the reduction is finalized, theReductionFunctions that use this data collector act like regularAnalyticsValueclasses that can be accessed through theirget<value-type>methods.(FOR CLOUD)
- Overrides:
setMergedDatain classMaxCollector<MaxCollector.DoubleMaxCollector.MaxData>- Parameters:
data- the merged data to compute a reduction for
-
setData
public void setData(ReductionData data)
Description copied from class:ReductionDataCollectorFinalize the reduction with the collected data stored in the parameter. Once the reduction is finalized, theReductionFunctions that use this data collector act like regularAnalyticsValueclasses that can be accessed through theirget<value-type>methods.(FOR SINGLE-SHARD)
- Overrides:
setDatain classMaxCollector<MaxCollector.DoubleMaxCollector.MaxData>- Parameters:
data- the collected data to compute a reduction for
-
-