public interface StreamingConnector<S extends StreamingPackage,P extends ProducerPackage>
IoProcessor
.Modifier and Type | Method and Description |
---|---|
void |
beforeStream(P producerPackage)
Executed before record has been streamed.
|
void |
closeStream(S streamingPackage)
Close stream.
|
boolean |
consume(S streamingPackage,
Object message,
AtomicInteger row)
Consume the next record.
|
void |
endStream(P producerPackage)
Executed after record has been streamed.
|
StreamingCommitPolicy |
getCommitPolicy()
Gets the commit policy.
|
void |
setCommitPolicy(StreamingCommitPolicy commitPolicy)
Sets the commit policy.
|
void |
startStream(P producerPackage)
Start the stream.
|
boolean consume(S streamingPackage, Object message, AtomicInteger row) throws Exception
streamingPackage
- the streaming packagemessage
- the message to consumerow
- the current row numberException
- in case of any errorvoid closeStream(S streamingPackage)
streamingPackage
- the streaming packagevoid startStream(P producerPackage) throws Exception
producerPackage
- the producer packageException
- the exceptionvoid beforeStream(P producerPackage) throws Exception
producerPackage
- the producer packageException
- in case of any errorvoid endStream(P producerPackage) throws Exception
producerPackage
- the producer packageException
- in case of any errorvoid setCommitPolicy(StreamingCommitPolicy commitPolicy)
commitPolicy
- the new commit policyStreamingCommitPolicy getCommitPolicy()
Copyright © 2010-2020 Toolsverse. All Rights Reserved.