Class MaxCollector<T extends ReductionData>
- java.lang.Object
-
- org.apache.solr.analytics.function.reduction.data.ReductionDataCollector<T>
-
- org.apache.solr.analytics.function.reduction.data.MaxCollector<T>
-
- Type Parameters:
T- The type of data being processed.
- Direct Known Subclasses:
MaxCollector.DoubleMaxCollector,MaxCollector.FloatMaxCollector,MaxCollector.IntMaxCollector,MaxCollector.LongMaxCollector,MaxCollector.StringMaxCollector
public abstract class MaxCollector<T extends ReductionData> extends ReductionDataCollector<T>
Collector of max values.Supported types are:
- Int
- Long
- Float
- Double
- Date (through longs)
- String
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMaxCollector.DoubleMaxCollectorstatic classMaxCollector.FloatMaxCollectorstatic classMaxCollector.IntMaxCollectorstatic classMaxCollector.LongMaxCollectorstatic classMaxCollector.StringMaxCollector
-
Field Summary
Fields Modifier and Type Field Description static Stringname-
Fields inherited from class org.apache.solr.analytics.function.reduction.data.ReductionDataCollector
collectionTargets, ioData, lastingTargets
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedMaxCollector(AnalyticsValueStream param)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanexists()Returns true if any of the values being reduce exist, and false if none of them do.StringgetExpressionStr()The unique expression string of the reduction data collector, given all inputs and parameters.StringgetName()Get the name of the reduction data collector.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.-
Methods inherited from class org.apache.solr.analytics.function.reduction.data.ReductionDataCollector
addCollectTarget, addLastingCollectTarget, apply, clearLastingCollectTargets, collect, collectAndApply, dataIO, newData, newDataIO, newDataTarget, submitReservations
-
-
-
-
Field Detail
-
name
public static final String name
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
MaxCollector
protected MaxCollector(AnalyticsValueStream param)
-
-
Method Detail
-
exists
public boolean exists()
Returns true if any of the values being reduce exist, and false if none of them do.- Returns:
- whether a max value exists
-
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)
- Specified by:
setMergedDatain classReductionDataCollector<T extends ReductionData>- 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)
- Specified by:
setDatain classReductionDataCollector<T extends ReductionData>- Parameters:
data- the collected data to compute a reduction for
-
getName
public String getName()
Description copied from class:ReductionDataCollectorGet the name of the reduction data collector. This is the same across all instances of the data collector.- Specified by:
getNamein classReductionDataCollector<T extends ReductionData>- Returns:
- the name
-
getExpressionStr
public String getExpressionStr()
Description copied from class:ReductionDataCollectorThe unique expression string of the reduction data collector, given all inputs and parameters. Used duringReductionDataCollectorsyncing. Since the string should be unique, only one of expression is kept.- Specified by:
getExpressionStrin classReductionDataCollector<T extends ReductionData>- Returns:
- the expression string
-
-