Interface JobRemoteStepSubmitter

  • All Superinterfaces:
    org.springframework.batch.core.partition.PartitionHandler

    public interface JobRemoteStepSubmitter
    extends org.springframework.batch.core.partition.PartitionHandler
    Submits partitioned step executions to remote workers and tracks completion. Extends PartitionHandler to 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.String getStepName()  
      boolean isGrouped()  
      void setDataSource​(javax.sql.DataSource dataSource)
      DataSource pointing to the job repository
      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.
      void setGridSize​(int gridSize)
      Passed to the StepExecutionSplitter in the PartitionHandler.handle(StepExecutionSplitter, StepExecution) method, instructing it how many StepExecution instances are required, ideally.
      void setGrouped​(boolean grouped)  
      void setJobExplorer​(org.springframework.batch.core.explore.JobExplorer jobExplorer)
      JobExplorer to use to query the job repository.
      void setPollInterval​(long pollInterval)
      How often to poll the job repository for the status of the slaves.
      void setStepName​(java.lang.String stepName)
      The name of the Step that will be used to execute the partitioned StepExecution.
      void setTimeout​(long timeout)
      When using job repository polling, the time limit to wait.
      • Methods inherited from interface org.springframework.batch.core.partition.PartitionHandler

        handle
    • 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)
        JobExplorer to use to query the job repository. Either this or a DataSource is required when using job repository polling.
        Parameters:
        jobExplorer - JobExplorer to 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)
        DataSource pointing to the job repository
        Parameters:
        dataSource - DataSource that 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 StepExecutionRequest payloads
        • reply channel that returns a list of StepExecution results
        The timeout for the repoy should be set sufficiently long that the remote steps have time to complete.
        Parameters:
        messagingGateway - the MessagingTemplate to set
      • setGridSize

        void setGridSize​(int gridSize)
        Passed to the StepExecutionSplitter in the PartitionHandler.handle(StepExecutionSplitter, StepExecution) method, instructing it how many StepExecution instances are required, ideally. The StepExecutionSplitter is 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 the Step that will be used to execute the partitioned StepExecution. This is a regular Spring Batch step, with all the business logic required to complete an execution based on the input parameters in its StepExecution context. The name will be translated into a Step instance by the remote worker.
        Parameters:
        stepName - the name of the Step instance 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