public class MovingWindowProcessor extends AbstractEmittingProcessor
Modifier and Type | Class and Description |
---|---|
static class |
MovingWindowProcessor.MovingWindowProcessFactory |
Constructor and Description |
---|
MovingWindowProcessor() |
MovingWindowProcessor(int windowSizeMS) |
Modifier and Type | Method and Description |
---|---|
protected int |
compare(RawTagValue a,
RawTagValue b) |
protected RawTagValue |
compare(RawTagValue curVal,
RawTagValue other,
boolean min) |
void |
configure(int windowSizeMS,
long windowAlignmentTime)
Sets the parameters of this processor.
|
protected void |
finishUpTo(long time) |
void |
flush()
Indicate that the handler won't get any more data, at least for a while.
|
protected boolean |
isAveragable(RawTagValue value) |
protected void |
processValue(RawTagValue value)
When this function is called, we know that we're in the current window.
|
void |
putValue(RawTagValue inValue)
Insert a value into the handler.
|
protected void |
updateAverage(RawTagValue newValue) |
emitValue, takeProcessed
public MovingWindowProcessor()
public MovingWindowProcessor(int windowSizeMS)
public void configure(int windowSizeMS, long windowAlignmentTime)
public void putValue(RawTagValue inValue)
DataHandler
public void flush() throws java.lang.Exception
DataHandler
java.lang.Exception
protected boolean isAveragable(RawTagValue value)
protected void processValue(RawTagValue value)
protected RawTagValue compare(RawTagValue curVal, RawTagValue other, boolean min)
protected int compare(RawTagValue a, RawTagValue b)
protected void updateAverage(RawTagValue newValue)
protected void finishUpTo(long time)