public class StreamsProcessorTask extends BaseStreamsTask implements DatumStatusCountable
Constructor and Description |
---|
StreamsProcessorTask(StreamsProcessor processor)
Default constructor, uses default sleep time of 500ms when inbound queue is empty
|
StreamsProcessorTask(StreamsProcessor processor,
org.apache.streams.config.StreamsConfiguration streamConfig) |
Modifier and Type | Method and Description |
---|---|
void |
addInputQueue(BlockingQueue<StreamsDatum> inputQueue)
Add an input
Queue for this task. |
DatumStatusCounter |
getDatumStatusCounter() |
List<BlockingQueue<StreamsDatum>> |
getInputQueues()
Returns the input queues that have been set for this task.
|
boolean |
isRunning()
Returns true when the task has not completed.
|
boolean |
isWaiting()
Returns true if the task is waiting on more data to process
|
void |
run() |
void |
setStreamConfig(org.apache.streams.config.StreamsConfiguration config)
Set the configuration object that will shared and passed to all instances of StreamsTask.
|
void |
setStreamsTaskCounter(StreamsTaskCounter counter) |
void |
stopTask()
Informs the task to stop.
|
addOutputQueue, addToOutgoingQueue, cloneStreamsDatum, getNextDatum, getOutputQueues, getStartedAt, getStreamIdentifier, setStartedAt
public StreamsProcessorTask(StreamsProcessor processor)
processor
- process to run in taskpublic StreamsProcessorTask(StreamsProcessor processor, org.apache.streams.config.StreamsConfiguration streamConfig)
processor
- streamConfig
- public DatumStatusCounter getDatumStatusCounter()
getDatumStatusCounter
in interface DatumStatusCountable
public boolean isWaiting()
StreamsTask
isWaiting
in interface StreamsTask
isWaiting
in class BaseStreamsTask
public void stopTask()
StreamsTask
stopTask
in interface StreamsTask
public void setStreamConfig(org.apache.streams.config.StreamsConfiguration config)
StreamsTask
setStreamConfig
in interface StreamsTask
config
- optional configuration informationpublic void addInputQueue(BlockingQueue<StreamsDatum> inputQueue)
StreamsTask
Queue
for this task.addInputQueue
in interface StreamsTask
addInputQueue
in class BaseStreamsTask
public boolean isRunning()
StreamsTask
isRunning
in interface StreamsTask
public List<BlockingQueue<StreamsDatum>> getInputQueues()
StreamsTask
getInputQueues
in interface StreamsTask
getInputQueues
in class BaseStreamsTask
public void setStreamsTaskCounter(StreamsTaskCounter counter)
setStreamsTaskCounter
in interface StreamsTask
Copyright © 2018 The Apache Software Foundation. All rights reserved.