类 AbstractTaskletStepBuilder<B extends AbstractTaskletStepBuilder<B>>

    • 方法详细资料

      • taskExecutor

        public AbstractTaskletStepBuilder<BtaskExecutor​(org.springframework.core.task.TaskExecutor taskExecutor)
        Provide a task executor to use when executing the tasklet. Default is to use a single-threaded (synchronous) executor.
        参数:
        taskExecutor - the task executor to register
        返回:
        this for fluent chaining
      • throttleLimit

        public AbstractTaskletStepBuilder<BthrottleLimit​(int throttleLimit)
        In the case of an asynchronous taskExecutor(TaskExecutor) the number of concurrent tasklet executions can be throttled (beyond any throttling provided by a thread pool). The throttle limit should be less than the data source pool size used in the job repository for this step.
        参数:
        throttleLimit - maximum number of concurrent tasklet executions allowed
        返回:
        this for fluent chaining
      • stepOperations

        public AbstractTaskletStepBuilder<BstepOperations​(RepeatOperations repeatTemplate)
        Sets the repeat template used for iterating the tasklet execution. By default it will terminate only when the tasklet returns FINISHED (or null).
        参数:
        repeatTemplate - a repeat template with rules for iterating
        返回:
        this for fluent chaining
      • transactionAttribute

        public AbstractTaskletStepBuilder<BtransactionAttribute​(org.springframework.transaction.interceptor.TransactionAttribute transactionAttribute)
        Sets the transaction attributes for the tasklet execution. Defaults to the default values for the transaction manager, but can be manipulated to provide longer timeouts for instance.
        参数:
        transactionAttribute - a transaction attribute set
        返回:
        this for fluent chaining
      • getStepOperations

        protected RepeatOperations getStepOperations()
        Convenience method for subclasses to access the step operations that were injected by user.
        返回:
        the repeat operations used to iterate the tasklet executions
      • getExceptionHandler

        protected ExceptionHandler getExceptionHandler()
        Convenience method for subclasses to access the exception handler that was injected by user.
        返回:
        the exception handler
      • concurrent

        protected boolean concurrent()
        Convenience method for subclasses to determine if the step is concurrent.
        返回:
        true if the tasklet is going to be run in multiple threads
      • getTaskExecutor

        protected org.springframework.core.task.TaskExecutor getTaskExecutor()
      • getTransactionAttribute

        protected org.springframework.transaction.interceptor.TransactionAttribute getTransactionAttribute()