public interface StepRunner
Modifier and Type | Method and Description |
---|---|
void |
awaitCompletion()
Blocks until the step execution is complete.
|
void |
awaitCompletion(long timeout,
java.util.concurrent.TimeUnit unit)
Blocks until the step execution is complete.
|
int |
getBatchSize()
Returns the batch size
|
StepRunner |
onFinished(StepFinishedListener listener)
Sets the finished listener for when the item has processed (similar to a finally)
|
StepRunner |
onItemComplete(StepItemCompleteListener listener)
Sets a listener on each item completing
|
StepRunner |
onItemFailed(StepItemFailureListener listener)
Sets the failure listener for each item in the flow
|
StepRunner |
onStatusChanged(StepStatusListener listener)
Sets the status change listener on the flowrunner object
|
RunStepResponse |
run()
Runs the flow and creates the job
|
RunStepResponse |
run(java.util.Collection<java.lang.String> uris)
Runs the flow and creates the job.
|
void |
stop()
Stops the step run
|
StepRunner |
withBatchSize(int batchSize)
Sets the batch size for the step runner
|
StepRunner |
withFlow(Flow flow)
Sets the flow to be used with the step runner
|
StepRunner |
withJobId(java.lang.String jobId)
Sets the batch size for the step runner
|
StepRunner |
withOptions(java.util.Map<java.lang.String,java.lang.Object> options)
Sets the options to be passed into the xqy or sjs flow in the $options or options variables of main.
|
StepRunner |
withStep(java.lang.String step)
Sets the batch size for the step runner
|
StepRunner |
withStepConfig(java.util.Map<java.lang.String,java.lang.Object> stepConfig)
Sets the config to be used in orchestrating the step.
|
StepRunner |
withStopOnFailure(boolean stopOnFailure)
Sets if this will stop the job on a failure, or if it will continue on
|
StepRunner |
withThreadCount(int threadCount)
Sets the thread count for the flowrunner
|
StepRunner withFlow(Flow flow)
flow
- the flow object to be usedStepRunner withBatchSize(int batchSize)
batchSize
- - the size of the batch in integer formStepRunner withStep(java.lang.String step)
step
- - the step to be run in the flowStepRunner withJobId(java.lang.String jobId)
jobId
- - the id of the jobStepRunner withThreadCount(int threadCount)
threadCount
- - the number of threads for the step runner to useStepRunner withOptions(java.util.Map<java.lang.String,java.lang.Object> options)
options
- - the object map of options as string/object pairStepRunner withStepConfig(java.util.Map<java.lang.String,java.lang.Object> stepConfig)
stepConfig
- - the object map of configurations for the step to execute as string/object pairStepRunner withStopOnFailure(boolean stopOnFailure)
stopOnFailure
- - true to stop the job if a failure happensStepRunner onItemComplete(StepItemCompleteListener listener)
listener
- the listen object to setStepRunner onItemFailed(StepItemFailureListener listener)
listener
- the listener for the failures in the flowStepRunner onStatusChanged(StepStatusListener listener)
listener
- - the listener for when the status changesStepRunner onFinished(StepFinishedListener listener)
listener
- - the listener for the flow item when it finishesvoid awaitCompletion()
void awaitCompletion(long timeout, java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedException, java.util.concurrent.TimeoutException
timeout
- the maximum time to waitunit
- the time unit of the timeout argumentjava.lang.InterruptedException
- if interrupted while waitingjava.util.concurrent.TimeoutException
- if times outRunStepResponse run()
RunStepResponse run(java.util.Collection<java.lang.String> uris)
uris
- the ids to pass to the harmonization flowvoid stop()
int getBatchSize()