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 class
MaxCollector.DoubleMaxCollector
static class
MaxCollector.FloatMaxCollector
static class
MaxCollector.IntMaxCollector
static class
MaxCollector.LongMaxCollector
static class
MaxCollector.StringMaxCollector
-
Field Summary
Fields Modifier and Type Field Description static String
name
-
Fields inherited from class org.apache.solr.analytics.function.reduction.data.ReductionDataCollector
collectionTargets, ioData, lastingTargets
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
MaxCollector(AnalyticsValueStream param)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
exists()
Returns true if any of the values being reduce exist, and false if none of them do.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.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.-
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:ReductionDataCollector
Finalize the reduction with the merged data stored in the parameter. Once the reduction is finalized, theReductionFunction
s that use this data collector act like regularAnalyticsValue
classes that can be accessed through theirget<value-type>
methods.(FOR CLOUD)
- Specified by:
setMergedData
in classReductionDataCollector<T extends ReductionData>
- Parameters:
data
- the merged data to compute a reduction for
-
setData
public void setData(ReductionData data)
Description copied from class:ReductionDataCollector
Finalize the reduction with the collected data stored in the parameter. Once the reduction is finalized, theReductionFunction
s that use this data collector act like regularAnalyticsValue
classes that can be accessed through theirget<value-type>
methods.(FOR SINGLE-SHARD)
- Specified by:
setData
in classReductionDataCollector<T extends ReductionData>
- Parameters:
data
- the collected data to compute a reduction for
-
getName
public String getName()
Description copied from class:ReductionDataCollector
Get the name of the reduction data collector. This is the same across all instances of the data collector.- Specified by:
getName
in classReductionDataCollector<T extends ReductionData>
- Returns:
- the name
-
getExpressionStr
public String getExpressionStr()
Description copied from class:ReductionDataCollector
The unique expression string of the reduction data collector, given all inputs and parameters. Used duringReductionDataCollector
syncing. Since the string should be unique, only one of expression is kept.- Specified by:
getExpressionStr
in classReductionDataCollector<T extends ReductionData>
- Returns:
- the expression string
-
-