public class StreamDiscretizer<IN> extends AbstractStreamOperator<WindowEvent<IN>> implements OneInputStreamOperator<IN,WindowEvent<IN>>
StreamWindow that will be further transformed in the next stages.StreamOperator.ChainingStrategy| Modifier and Type | Field and Description |
|---|---|
protected EvictionPolicy<IN> |
evictionPolicy |
protected TriggerPolicy<IN> |
triggerPolicy |
protected WindowEvent<IN> |
windowEvent |
chainingStrategy, executionConfig, inputCopyDisabled, output, runtimeContext| Constructor and Description |
|---|
StreamDiscretizer(TriggerPolicy<IN> triggerPolicy,
EvictionPolicy<IN> evictionPolicy) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
This method is called after no more elements for can arrive for processing.
|
protected void |
emitWindow()
This method emits the content of the buffer as a new
StreamWindow
if not empty |
boolean |
equals(Object other) |
EvictionPolicy<IN> |
getEviction() |
TriggerPolicy<IN> |
getTrigger() |
void |
open(org.apache.flink.configuration.Configuration parameters)
This method is called before any elements are processed.
|
void |
processElement(IN element) |
protected void |
processRealElement(IN input)
This method processed an arrived real element The method is synchronized
to ensure that it cannot interleave with
triggerOnFakeElement(Object) |
String |
toString() |
protected void |
triggerOnFakeElement(Object input)
This method triggers on an arrived fake element The method is
synchronized to ensure that it cannot interleave with
processRealElement(Object) |
disableInputCopy, getChainingStrategy, isInputCopyingDisabled, setChainingStrategy, setupclone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetChainingStrategy, isInputCopyingDisabled, setChainingStrategy, setupprotected TriggerPolicy<IN> triggerPolicy
protected EvictionPolicy<IN> evictionPolicy
protected WindowEvent<IN> windowEvent
public StreamDiscretizer(TriggerPolicy<IN> triggerPolicy, EvictionPolicy<IN> evictionPolicy)
public TriggerPolicy<IN> getTrigger()
public EvictionPolicy<IN> getEviction()
public void processElement(IN element) throws Exception
processElement in interface OneInputStreamOperator<IN,WindowEvent<IN>>Exceptionprotected void processRealElement(IN input) throws Exception
triggerOnFakeElement(Object)input - a real input elementExceptionprotected void triggerOnFakeElement(Object input)
processRealElement(Object)input - a fake input elementprotected void emitWindow()
StreamWindow
if not emptypublic void open(org.apache.flink.configuration.Configuration parameters)
throws Exception
StreamOperatoropen in interface StreamOperator<WindowEvent<IN>>open in class AbstractStreamOperator<WindowEvent<IN>>Exceptionpublic void close()
throws Exception
StreamOperatorclose in interface StreamOperator<WindowEvent<IN>>close in class AbstractStreamOperator<WindowEvent<IN>>ExceptionCopyright © 2014–2015 The Apache Software Foundation. All rights reserved.