public class QueryStepRunner extends java.lang.Object implements StepRunner
| Modifier and Type | Field and Description | 
|---|---|
protected org.slf4j.Logger | 
logger  | 
| Constructor and Description | 
|---|
QueryStepRunner(HubConfig hubConfig)  | 
| 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 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 | 
withDestinationDatabase(java.lang.String destinationDatabase)
Sets the database where flow output data will be persisted to 
 | 
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 | 
withSourceClient(com.marklogic.client.DatabaseClient stagingClient)
Sets the source client on the step runner. 
 | 
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 | 
withStepDefinition(StepDefinition stepDefinition)  | 
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 
 | 
public QueryStepRunner(HubConfig hubConfig)
public StepRunner withFlow(Flow flow)
StepRunnerwithFlow in interface StepRunnerflow - the flow object to be usedpublic StepRunner withStep(java.lang.String step)
StepRunnerwithStep in interface StepRunnerstep - - the step to be run in the flowpublic StepRunner withJobId(java.lang.String jobId)
StepRunnerwithJobId in interface StepRunnerjobId - - the id of the jobpublic StepRunner withStepDefinition(StepDefinition stepDefinition)
public StepRunner withBatchSize(int batchSize)
StepRunnerwithBatchSize in interface StepRunnerbatchSize - - the size of the batch in integer formpublic StepRunner withThreadCount(int threadCount)
StepRunnerwithThreadCount in interface StepRunnerthreadCount - - the number of threads for the step runner to usepublic StepRunner withSourceClient(com.marklogic.client.DatabaseClient stagingClient)
StepRunnerwithSourceClient in interface StepRunnerstagingClient - - the client that will be usedpublic StepRunner withDestinationDatabase(java.lang.String destinationDatabase)
StepRunnerwithDestinationDatabase in interface StepRunnerdestinationDatabase - - the name of the destination databasepublic StepRunner withStopOnFailure(boolean stopOnFailure)
StepRunnerwithStopOnFailure in interface StepRunnerstopOnFailure - - true to stop the job if a failure happenspublic StepRunner withOptions(java.util.Map<java.lang.String,java.lang.Object> options)
StepRunnerwithOptions in interface StepRunneroptions - - the object map of options as string/object pairpublic StepRunner withStepConfig(java.util.Map<java.lang.String,java.lang.Object> stepConfig)
StepRunnerwithStepConfig in interface StepRunnerstepConfig - - the object map of configurations for the step to execute as string/object pairpublic StepRunner onItemComplete(StepItemCompleteListener listener)
StepRunneronItemComplete in interface StepRunnerlistener - the listen object to setpublic StepRunner onItemFailed(StepItemFailureListener listener)
StepRunneronItemFailed in interface StepRunnerlistener - the listener for the failures in the flowpublic StepRunner onStatusChanged(StepStatusListener listener)
StepRunneronStatusChanged in interface StepRunnerlistener - - the listener for when the status changespublic StepRunner onFinished(StepFinishedListener listener)
StepRunneronFinished in interface StepRunnerlistener - - the listener for the flow item when it finishespublic void awaitCompletion()
StepRunnerawaitCompletion in interface StepRunnerpublic void awaitCompletion(long timeout,
                            java.util.concurrent.TimeUnit unit)
                     throws java.lang.InterruptedException,
                            java.util.concurrent.TimeoutException
StepRunnerawaitCompletion in interface StepRunnertimeout - the maximum time to waitunit - the time unit of the timeout argumentjava.lang.InterruptedException - if interrupted while waitingjava.util.concurrent.TimeoutException - if times outpublic RunStepResponse run()
StepRunnerrun in interface StepRunnerpublic void stop()
StepRunnerstop in interface StepRunnerpublic RunStepResponse run(java.util.Collection uris)
StepRunnerrun in interface StepRunneruris - the ids to pass to the harmonization flowpublic int getBatchSize()
StepRunnergetBatchSize in interface StepRunner