public class LegacyFlowRunnerImpl extends java.lang.Object implements LegacyFlowRunner
Modifier | Constructor and Description |
---|---|
protected |
LegacyFlowRunnerImpl() |
|
LegacyFlowRunnerImpl(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.
|
protected RunFlowResponse |
handleFlowRunnerException(java.lang.Exception e)
Deprecated.
|
LegacyFlowRunner |
onFinished(LegacyFlowFinishedListener listener)
Sets the finished listener for when the item has processed (similar to a finally)
|
LegacyFlowRunner |
onItemComplete(LegacyFlowItemCompleteListener listener)
Sets a listener on each item completing
|
LegacyFlowRunner |
onItemFailed(LegacyFlowItemFailureListener listener)
Sets the failure listener for each item in the flow
|
LegacyFlowRunner |
onStatusChanged(LegacyFlowStatusListener listener)
Sets the status change listener on the flowrunner object
|
com.marklogic.client.datamovement.JobTicket |
run()
Deprecated.
|
LegacyFlowRunner |
withBatchSize(int batchSize)
Sets the batch size for the flow runner
|
LegacyFlowRunner |
withDestinationDatabase(java.lang.String destinationDatabase)
Sets the database where flow output data will be presisted to
|
LegacyFlowRunner |
withFlow(LegacyFlow flow)
Sets the flow to be used with the flow runner
|
LegacyFlowRunner |
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.
|
LegacyFlowRunner |
withSourceClient(com.marklogic.client.DatabaseClient stagingClient)
Sets the source client on the flow runner.
|
LegacyFlowRunner |
withStopOnFailure(boolean stopOnFailure)
Sets if this will stop the job on a failure, or if it will continue on
|
LegacyFlowRunner |
withThreadCount(int threadCount)
Sets the thread count for the flowrunner
|
public LegacyFlowRunnerImpl(HubConfig hubConfig)
protected LegacyFlowRunnerImpl()
public LegacyFlowRunner withFlow(LegacyFlow flow)
LegacyFlowRunner
withFlow
in interface LegacyFlowRunner
flow
- the flow object to be usedpublic LegacyFlowRunner withBatchSize(int batchSize)
LegacyFlowRunner
withBatchSize
in interface LegacyFlowRunner
batchSize
- - the size of the batch in integer formpublic LegacyFlowRunner withThreadCount(int threadCount)
LegacyFlowRunner
withThreadCount
in interface LegacyFlowRunner
threadCount
- - the number of threads for the flow runner to usepublic LegacyFlowRunner withSourceClient(com.marklogic.client.DatabaseClient stagingClient)
LegacyFlowRunner
withSourceClient
in interface LegacyFlowRunner
stagingClient
- - the client that will be usedpublic LegacyFlowRunner withDestinationDatabase(java.lang.String destinationDatabase)
LegacyFlowRunner
withDestinationDatabase
in interface LegacyFlowRunner
destinationDatabase
- - the name of the databasepublic LegacyFlowRunner withStopOnFailure(boolean stopOnFailure)
LegacyFlowRunner
withStopOnFailure
in interface LegacyFlowRunner
stopOnFailure
- - true to stop the job if a failure happenspublic LegacyFlowRunner withOptions(java.util.Map<java.lang.String,java.lang.Object> options)
LegacyFlowRunner
withOptions
in interface LegacyFlowRunner
options
- - the object map of options as string/object pairpublic LegacyFlowRunner onItemComplete(LegacyFlowItemCompleteListener listener)
LegacyFlowRunner
onItemComplete
in interface LegacyFlowRunner
listener
- the listen object to setpublic LegacyFlowRunner onItemFailed(LegacyFlowItemFailureListener listener)
LegacyFlowRunner
onItemFailed
in interface LegacyFlowRunner
listener
- the listener for the failures in the flowpublic LegacyFlowRunner onStatusChanged(LegacyFlowStatusListener listener)
LegacyFlowRunner
onStatusChanged
in interface LegacyFlowRunner
listener
- - the listener for when the status changespublic LegacyFlowRunner onFinished(LegacyFlowFinishedListener listener)
LegacyFlowRunner
onFinished
in interface LegacyFlowRunner
listener
- - the listener for the flow item when it finishespublic void awaitCompletion()
LegacyFlowRunner
awaitCompletion
in interface LegacyFlowRunner
public void awaitCompletion(long timeout, java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedException
LegacyFlowRunner
awaitCompletion
in interface LegacyFlowRunner
timeout
- the maximum time to waitunit
- the time unit of the timeout argumentjava.lang.InterruptedException
- if interrupted while waiting@Deprecated public com.marklogic.client.datamovement.JobTicket run()
LegacyFlowRunner
run
in interface LegacyFlowRunner
@Deprecated protected RunFlowResponse handleFlowRunnerException(java.lang.Exception e)