Class EmittingProcessorContext<T>
- java.lang.Object
-
- org.apache.storm.streams.processors.EmittingProcessorContext<T>
-
- All Implemented Interfaces:
Serializable
,ProcessorContext<T>
public class EmittingProcessorContext<T> extends Object implements ProcessorContext<T>
A context that emits the results to downstream processors which are in another bolt.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description EmittingProcessorContext(ProcessorNode processorNode, OutputCollector collector, String outputStreamId)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
forward(T input)
Forwards the input to all downstream processors.void
forward(T input, String stream)
Forwards the input to downstream processors at specified stream.Set<String>
getWindowedParentStreams()
Returns the windowed parent streams.boolean
isWindowed()
Returns true if the processing is in a windowed context and should wait for punctuation before emitting results.void
setAnchor(RefCountedTuple anchor)
void
setEventTimestamp(long timestamp)
void
setTimestampField(String fieldName)
-
-
-
Constructor Detail
-
EmittingProcessorContext
public EmittingProcessorContext(ProcessorNode processorNode, OutputCollector collector, String outputStreamId)
-
-
Method Detail
-
forward
public void forward(T input)
Description copied from interface:ProcessorContext
Forwards the input to all downstream processors.- Specified by:
forward
in interfaceProcessorContext<T>
- Parameters:
input
- the input
-
forward
public void forward(T input, String stream)
Description copied from interface:ProcessorContext
Forwards the input to downstream processors at specified stream.- Specified by:
forward
in interfaceProcessorContext<T>
- Parameters:
input
- the inputstream
- the stream to forward
-
isWindowed
public boolean isWindowed()
Description copied from interface:ProcessorContext
Returns true if the processing is in a windowed context and should wait for punctuation before emitting results.- Specified by:
isWindowed
in interfaceProcessorContext<T>
- Returns:
- whether this is a windowed context or not
-
getWindowedParentStreams
public Set<String> getWindowedParentStreams()
Description copied from interface:ProcessorContext
Returns the windowed parent streams. These are the streams where punctuations arrive.- Specified by:
getWindowedParentStreams
in interfaceProcessorContext<T>
- Returns:
- the windowed parent streams
-
setTimestampField
public void setTimestampField(String fieldName)
-
setAnchor
public void setAnchor(RefCountedTuple anchor)
-
setEventTimestamp
public void setEventTimestamp(long timestamp)
-
-