Package org.unidata.mdm.core.service.job
Interface JobRemoteStepSubmitter
-
- All Superinterfaces:
org.springframework.batch.core.partition.PartitionHandler
public interface JobRemoteStepSubmitter extends org.springframework.batch.core.partition.PartitionHandlerSubmits partitioned step executions to remote workers and tracks completion. ExtendsPartitionHandlerto be able to be used by Spring Batch.- Since:
- 6.14
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.StringgetStepName()booleanisGrouped()voidsetDataSource(javax.sql.DataSource dataSource)DataSourcepointing to the job repositoryvoidsetGateway(java.util.concurrent.BlockingQueue<org.springframework.messaging.Message<org.springframework.batch.integration.partition.StepExecutionRequest>> messagingGateway)A pre-configured gateway for sending and receiving messages to the remote workers.voidsetGridSize(int gridSize)Passed to theStepExecutionSplitterin thePartitionHandler.handle(StepExecutionSplitter, StepExecution)method, instructing it how manyStepExecutioninstances are required, ideally.voidsetGrouped(boolean grouped)voidsetJobExplorer(org.springframework.batch.core.explore.JobExplorer jobExplorer)JobExplorerto use to query the job repository.voidsetPollInterval(long pollInterval)How often to poll the job repository for the status of the slaves.voidsetStepName(java.lang.String stepName)The name of theStepthat will be used to execute the partitionedStepExecution.voidsetTimeout(long timeout)When using job repository polling, the time limit to wait.
-
-
-
Method Detail
-
setTimeout
void setTimeout(long timeout)
When using job repository polling, the time limit to wait.- Parameters:
timeout- millisconds to wait, defaults to -1 (no timeout).
-
setJobExplorer
void setJobExplorer(org.springframework.batch.core.explore.JobExplorer jobExplorer)
JobExplorerto use to query the job repository. Either this or aDataSourceis required when using job repository polling.- Parameters:
jobExplorer-JobExplorerto use for lookups
-
setPollInterval
void setPollInterval(long pollInterval)
How often to poll the job repository for the status of the slaves.- Parameters:
pollInterval- milliseconds between polls, defaults to 10000 (10 seconds).
-
setDataSource
void setDataSource(javax.sql.DataSource dataSource)
DataSourcepointing to the job repository- Parameters:
dataSource-DataSourcethat points to the job repository's store
-
setGateway
void setGateway(java.util.concurrent.BlockingQueue<org.springframework.messaging.Message<org.springframework.batch.integration.partition.StepExecutionRequest>> messagingGateway)
A pre-configured gateway for sending and receiving messages to the remote workers. Using this property allows a large degree of control over the timeouts and other properties of the send. It should have channels set up internally:- request channel capable of accepting
StepExecutionRequestpayloads - reply
channel that returns a list of
StepExecutionresults
- Parameters:
messagingGateway- theMessagingTemplateto set
- request channel capable of accepting
-
setGridSize
void setGridSize(int gridSize)
Passed to theStepExecutionSplitterin thePartitionHandler.handle(StepExecutionSplitter, StepExecution)method, instructing it how manyStepExecutioninstances are required, ideally. TheStepExecutionSplitteris allowed to ignore the grid size in the case of a restart, since the input data partitions must be preserved.- Parameters:
gridSize- the number of step executions that will be created
-
setStepName
void setStepName(java.lang.String stepName)
The name of theStepthat will be used to execute the partitionedStepExecution. This is a regular Spring Batch step, with all the business logic required to complete an execution based on the input parameters in itsStepExecutioncontext. The name will be translated into aStepinstance by the remote worker.- Parameters:
stepName- the name of theStepinstance to execute business logic
-
getStepName
java.lang.String getStepName()
- Returns:
- the stepName
-
setGrouped
void setGrouped(boolean grouped)
- Parameters:
grouped- the grouped to set
-
isGrouped
boolean isGrouped()
- Returns:
- the grouped
-
-