public interface StreamConsumer
| Modifier and Type | Method and Description |
|---|---|
void |
addFilledBuffer(ByteBuffer buffer)
Will be called by the thread that produces byte buffers with available
data to be processed.
|
String |
getId()
Uniquely identifies the consumer
|
boolean |
isConsumerFinished()
If true signals the consumer is done consuming data and will not process
any more buffers.
|
void |
process()
Will be called by the thread that executes the consumption of data.
|
void |
setReturnBufferQueue(BufferPool returnQueue)
Will be called once just after construction.
|
void |
signalEndOfStream()
Called once the end of the input stream is detected
|
void setReturnBufferQueue(BufferPool returnQueue)
addFilledBuffer is called there should be an
associated add to this given queue. If not, buffers will run out and all
stream processing will halt. READ THIS!!!returnQueue - pool of buffers to usevoid addFilledBuffer(ByteBuffer buffer)
buffer - filled buffervoid process()
throws IOException
isConsumerFinished returns
true this method will likely do nothing.IOException - if there is an issue processingvoid signalEndOfStream()
boolean isConsumerFinished()
String getId()
Copyright © 2023 Apache NiFi Project. All rights reserved.