public class DocCountFunction extends LongValue.AbstractLongValue implements ReductionFunction
AnalyticsValue.AbstractAnalyticsValue
AnalyticsValueStream.ExpressionType
LongValue.AbstractLongValue, LongValue.CastingLongValue
LongValueStream.AbstractLongValueStream, LongValueStream.CastingLongValueStream
DoubleValue.AbstractDoubleValue, DoubleValue.CastingDoubleValue
DoubleValueStream.AbstractDoubleValueStream, DoubleValueStream.CastingDoubleValueStream
StringValue.AbstractStringValue, StringValue.CastingStringValue
StringValueStream.AbstractStringValueStream, StringValueStream.CastingStringValueStream
Modifier and Type | Field and Description |
---|---|
static ExpressionFactory.CreatorFunction |
creatorFunction |
static String |
name |
Constructor and Description |
---|
DocCountFunction() |
DocCountFunction(AnalyticsValueStream param) |
Modifier and Type | Method and Description |
---|---|
boolean |
exists()
Check whether the current value exists.
|
String |
getExpressionStr()
Get the expression string of the analytics value stream.
|
AnalyticsValueStream.ExpressionType |
getExpressionType()
Get the type of the expression that this class represents.
|
long |
getLong()
Get the long representation of the current value.
|
String |
getName()
Get the name of function or value.
|
void |
synchronizeDataCollectors(UnaryOperator<ReductionDataCollector<?>> sync)
Syncs the data collectors with shared versions across the entire Analytics Request
so that as little data as possible is sent across shards.
|
getDouble, getObject, getObjectComparator, getString, streamDoubles, streamLongs, streamObjects, streamStrings
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getObject
createExpressionString, determineMappingPhase, streamObjects
public static final String name
public static final ExpressionFactory.CreatorFunction creatorFunction
public DocCountFunction()
public DocCountFunction(AnalyticsValueStream param)
public long getLong()
LongValue
NOTE: The value returned is not valid unless calling AnalyticsValue.exists()
afterwards returns TRUE
.
public boolean exists()
AnalyticsValue
get<Type>()
method is called.exists
in interface AnalyticsValue
public void synchronizeDataCollectors(UnaryOperator<ReductionDataCollector<?>> sync)
ReductionFunction
synchronizeDataCollectors
in interface ReductionFunction
sync
- a function that takes in a ReductionDataCollector
and returns a shared versionpublic String getExpressionStr()
AnalyticsValueStream
ExpressionFactory.createExpression(String)
, the exact same expression should be created.getExpressionStr
in interface AnalyticsValueStream
public String getName()
AnalyticsValueStream
getName
in interface AnalyticsValueStream
public AnalyticsValueStream.ExpressionType getExpressionType()
AnalyticsValueStream
getExpressionType
in interface AnalyticsValueStream
Copyright © 2000-2017 Apache Software Foundation. All Rights Reserved.