public class FlowRunnerImpl extends java.lang.Object implements FlowRunner
| Constructor and Description |
|---|
FlowRunnerImpl(HubConfig hubConfig) |
| Modifier and Type | Method and Description |
|---|---|
void |
awaitCompletion()
Blocks until the job is complete.
|
void |
awaitCompletion(long timeout,
java.util.concurrent.TimeUnit unit)
Blocks until the job is complete.
|
FlowRunner |
onFinished(FlowFinishedListener listener)
Sets the finished listener for when the item has processed (similar to a finally)
|
FlowRunner |
onItemComplete(FlowItemCompleteListener listener)
Sets a listener on each item completing
|
FlowRunner |
onItemFailed(FlowItemFailureListener listener)
Sets the failure listener for each item in the flow
|
FlowRunner |
onStatusChanged(FlowStatusListener listener)
Sets the status change listener on the flowrunner object
|
com.marklogic.client.datamovement.JobTicket |
run()
Runs the flow and creates the job
|
FlowRunner |
withBatchSize(int batchSize)
Sets the batch size for the flow runner
|
FlowRunner |
withDestinationDatabase(java.lang.String destinationDatabase)
Sets the database where flow output data will be presisted to
|
FlowRunner |
withFlow(Flow flow)
Sets the flow to be used with the flow runner
|
FlowRunner |
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.
|
FlowRunner |
withSourceClient(com.marklogic.client.DatabaseClient sourceClient)
Sets the source client on the flow runner.
|
FlowRunner |
withStopOnFailure(boolean stopOnFailure)
Sets if this will stop the job on a failure, or if it will continue on
|
FlowRunner |
withThreadCount(int threadCount)
Sets the thread count for the flowrunner
|
public FlowRunnerImpl(HubConfig hubConfig)
public FlowRunner withFlow(Flow flow)
FlowRunnerwithFlow in interface FlowRunnerflow - the flow object to be usedpublic FlowRunner withBatchSize(int batchSize)
FlowRunnerwithBatchSize in interface FlowRunnerbatchSize - - the size of the batch in integer formpublic FlowRunner withThreadCount(int threadCount)
FlowRunnerwithThreadCount in interface FlowRunnerthreadCount - - the number of threads for the flow runner to usepublic FlowRunner withSourceClient(com.marklogic.client.DatabaseClient sourceClient)
FlowRunnerwithSourceClient in interface FlowRunnersourceClient - - the client that will be usedpublic FlowRunner withDestinationDatabase(java.lang.String destinationDatabase)
FlowRunnerwithDestinationDatabase in interface FlowRunnerdestinationDatabase - - the name of the databasepublic FlowRunner withStopOnFailure(boolean stopOnFailure)
FlowRunnerwithStopOnFailure in interface FlowRunnerpublic FlowRunner withOptions(java.util.Map<java.lang.String,java.lang.Object> options)
FlowRunnerwithOptions in interface FlowRunneroptions - - the object map of options as string/object pairpublic FlowRunner onItemComplete(FlowItemCompleteListener listener)
FlowRunneronItemComplete in interface FlowRunnerlistener - the listen object to setpublic FlowRunner onItemFailed(FlowItemFailureListener listener)
FlowRunneronItemFailed in interface FlowRunnerlistener - the listener for the failures in the flowpublic FlowRunner onStatusChanged(FlowStatusListener listener)
FlowRunneronStatusChanged in interface FlowRunnerlistener - - the listener for when the status changespublic FlowRunner onFinished(FlowFinishedListener listener)
FlowRunneronFinished in interface FlowRunnerlistener - - the listener for the flow item when it finishespublic void awaitCompletion()
FlowRunnerawaitCompletion in interface FlowRunnerpublic void awaitCompletion(long timeout,
java.util.concurrent.TimeUnit unit)
throws java.lang.InterruptedException
FlowRunnerawaitCompletion in interface FlowRunnertimeout - the maximum time to waitunit - the time unit of the timeout argumentjava.lang.InterruptedException - if interrupted while waitingpublic com.marklogic.client.datamovement.JobTicket run()
FlowRunnerrun in interface FlowRunner