public abstract class BasicSource extends Object implements Source
| Modifier | Constructor and Description |
|---|---|
protected |
BasicSource() |
protected |
BasicSource(org.json.JSONObject config) |
protected |
BasicSource(String defaultPipelineName) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
protected long[] |
getBackoffTimes() |
MessageAndRouting |
getNextMessage(StreamProcessingContext spc,
long timeUnit,
TimeUnit units)
Get the next message from this source.
|
protected abstract MessageAndRouting |
internalGetNextMessage(StreamProcessingContext spc,
long timeUnit,
TimeUnit units) |
boolean |
isEof()
Is the source at EOF? Not all sources are bounded, so they may
always return false.
|
protected MessageAndRouting |
makeDefRoutingMessage(Message msg) |
void |
markComplete(StreamProcessingContext spc,
MessageAndRouting mr)
Called by the processing engine when processing for a given message is complete.
|
protected void |
noteEndOfStream() |
void |
requeue(MessageAndRouting msgAndRoute)
Requeue a message for delivery into the given pipeline
|
protected BasicSource(String defaultPipelineName)
protected BasicSource(org.json.JSONObject config)
protected BasicSource()
public boolean isEof()
Sourcepublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionpublic void requeue(MessageAndRouting msgAndRoute)
Sourcepublic final MessageAndRouting getNextMessage(StreamProcessingContext spc, long timeUnit, TimeUnit units) throws IOException, InterruptedException
SourcegetNextMessage in interface SourceIOExceptionInterruptedExceptionpublic void markComplete(StreamProcessingContext spc, MessageAndRouting mr)
SourcemarkComplete in interface Sourceprotected abstract MessageAndRouting internalGetNextMessage(StreamProcessingContext spc, long timeUnit, TimeUnit units) throws IOException, InterruptedException
IOExceptionInterruptedExceptionprotected long[] getBackoffTimes()
protected MessageAndRouting makeDefRoutingMessage(Message msg)
protected void noteEndOfStream()
Copyright © 2020 continual.io. All rights reserved.