public abstract class UniqueCollector<T> extends ReductionDataCollector<UniqueCollector.UniqueData<T>>
Supported types are:
| Modifier and Type | Class and Description |
|---|---|
static class |
UniqueCollector.UniqueData<T> |
static class |
UniqueCollector.UniqueDoubleCollector |
static class |
UniqueCollector.UniqueFloatCollector |
static class |
UniqueCollector.UniqueIntCollector |
static class |
UniqueCollector.UniqueLongCollector |
static class |
UniqueCollector.UniqueStringCollector |
| Modifier and Type | Field and Description |
|---|---|
static String |
name |
collectionTargets, ioData, lastingTargets| Constructor and Description |
|---|
UniqueCollector(AnalyticsValueStream param) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
apply(UniqueCollector.UniqueData<T> data)
Apply the collected info to the given reduction data.
|
long |
count()
Get the count of unique values in the set data.
|
T |
exportNext() |
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.
|
UniqueCollector.UniqueData<T> |
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.
|
int |
startExport() |
addCollectTarget, addLastingCollectTarget, clearLastingCollectTargets, collect, collectAndApply, dataIO, newDataIO, newDataTarget, submitReservationspublic static final String name
public UniqueCollector(AnalyticsValueStream param)
public long count()
public UniqueCollector.UniqueData<T> newData()
ReductionDataCollectornewData in class ReductionDataCollector<UniqueCollector.UniqueData<T>>protected void apply(UniqueCollector.UniqueData<T> data)
ReductionDataCollectorReductionDataCollector.collect() call.apply in class ReductionDataCollector<UniqueCollector.UniqueData<T>>data - reduction data to apply collected info topublic int startExport()
public T exportNext()
public 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<UniqueCollector.UniqueData<T>>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<UniqueCollector.UniqueData<T>>data - the collected data to compute a reduction forpublic String getName()
ReductionDataCollectorgetName in class ReductionDataCollector<UniqueCollector.UniqueData<T>>public String getExpressionStr()
ReductionDataCollectorReductionDataCollector syncing. Since the string should be unique,
only one of expression is kept.getExpressionStr in class ReductionDataCollector<UniqueCollector.UniqueData<T>>Copyright © 2000-2018 Apache Software Foundation. All Rights Reserved.