Uses of Interface
org.springframework.batch.repeat.RepeatContext
Package
Description
Implementation of the contexts for each of the custom bean scopes in Spring Batch (Job
and Step).
Specific implementations of step concerns for item-oriented approach.
Infrastructure implementations of repeat concerns.
Infrastructure implementations of repeat callback concerns.
Infrastructure implementations of repeat context concerns.
Infrastructure implementations of repeat exception handler concerns.
Infrastructure implementations of repeat interceptor concerns.
Infrastructure implementations of repeat policy concerns.
Infrastructure implementations of repeat support concerns.
-
Uses of RepeatContext in org.springframework.batch.core.resource
Modifier and TypeMethodDescriptionStepExecutionSimpleCompletionPolicy.start
(RepeatContext parent) Modifier and TypeMethodDescriptionboolean
StepExecutionSimpleCompletionPolicy.isComplete
(RepeatContext context) boolean
StepExecutionSimpleCompletionPolicy.isComplete
(RepeatContext context, RepeatStatus result) StepExecutionSimpleCompletionPolicy.start
(RepeatContext parent) void
StepExecutionSimpleCompletionPolicy.update
(RepeatContext context) -
Uses of RepeatContext in org.springframework.batch.core.scope.context
Modifier and TypeMethodDescriptionabstract RepeatStatus
StepContextRepeatCallback.doInChunkContext
(RepeatContext context, ChunkContext chunkContext) Do the work required for this chunk of the step.StepContextRepeatCallback.doInIteration
(RepeatContext context) Manage theStepContext
lifecycle. -
Uses of RepeatContext in org.springframework.batch.core.step.item
Modifier and TypeMethodDescriptionvoid
SimpleRetryExceptionHandler.handleException
(RepeatContext context, Throwable throwable) Check if the exception is going to be retried, and veto the handling if it is. -
Uses of RepeatContext in org.springframework.batch.repeat
Modifier and TypeMethodDescriptionRepeatContext.getParent()
If batches are nested, then the inner batch will be created with the outer one as a parent.CompletionPolicy.start
(RepeatContext parent) Create a new context for the execution of a batch.Modifier and TypeMethodDescriptiondefault void
RepeatListener.after
(RepeatContext context, RepeatStatus result) Called by the framework after each item has been processed, unless the item processing results in an exception.default void
RepeatListener.before
(RepeatContext context) Called by the framework before each batch item.default void
RepeatListener.close
(RepeatContext context) Called once at the end of a complete batch, after normal or abnormal completion (i.e.RepeatCallback.doInIteration
(RepeatContext context) Implementations return true if they can continue processing - e.g.boolean
CompletionPolicy.isComplete
(RepeatContext context) Allow policy to signal completion according to internal state, without having to wait for the callback to complete.boolean
CompletionPolicy.isComplete
(RepeatContext context, RepeatStatus result) Determine whether a batch is complete given the latest result from the callback.default void
RepeatListener.onError
(RepeatContext context, Throwable e) Called when a repeat callback fails by throwing an exception.default void
RepeatListener.open
(RepeatContext context) Called once at the start of a complete batch, before any items are processed.CompletionPolicy.start
(RepeatContext parent) Create a new context for the execution of a batch.void
CompletionPolicy.update
(RepeatContext context) Give implementations the opportunity to update the state of the current batch. -
Uses of RepeatContext in org.springframework.batch.repeat.callback
Modifier and TypeMethodDescriptionNestedRepeatCallback.doInIteration
(RepeatContext context) Simply calls template.execute(callback). -
Uses of RepeatContext in org.springframework.batch.repeat.context
ModifierConstructorDescriptionRepeatContextCounter
(RepeatContext context, String countKey) Convenience constructor with useParent=false.RepeatContextCounter
(RepeatContext context, String countKey, boolean useParent) Construct a newRepeatContextCounter
.RepeatContextSupport
(RepeatContext parent) Constructor forRepeatContextSupport
. -
Uses of RepeatContext in org.springframework.batch.repeat.exception
Modifier and TypeMethodDescriptionvoid
CompositeExceptionHandler.handleException
(RepeatContext context, Throwable throwable) Iterate over the handlers delegating the call to each in turn.void
DefaultExceptionHandler.handleException
(RepeatContext context, Throwable throwable) Re-throw the throwable.void
ExceptionHandler.handleException
(RepeatContext context, Throwable throwable) Deal with a Throwable during a batch - decide whether it should be re-thrown in the first place.void
LogOrRethrowExceptionHandler.handleException
(RepeatContext context, Throwable throwable) Classify the throwables and decide whether to rethrow based on the result.void
RethrowOnThresholdExceptionHandler.handleException
(RepeatContext context, Throwable throwable) Classify the throwables and decide whether to re-throw based on the result.void
SimpleLimitExceptionHandler.handleException
(RepeatContext context, Throwable throwable) Rethrows only if the limit is breached for this context on the exception type specified. -
Uses of RepeatContext in org.springframework.batch.repeat.listener
Modifier and TypeMethodDescriptionvoid
CompositeRepeatListener.after
(RepeatContext context, RepeatStatus result) void
RepeatListenerSupport.after
(RepeatContext context, RepeatStatus result) Deprecated.void
CompositeRepeatListener.before
(RepeatContext context) void
RepeatListenerSupport.before
(RepeatContext context) Deprecated.void
CompositeRepeatListener.close
(RepeatContext context) void
RepeatListenerSupport.close
(RepeatContext context) Deprecated.void
CompositeRepeatListener.onError
(RepeatContext context, Throwable e) void
RepeatListenerSupport.onError
(RepeatContext context, Throwable e) Deprecated.void
CompositeRepeatListener.open
(RepeatContext context) void
RepeatListenerSupport.open
(RepeatContext context) Deprecated. -
Uses of RepeatContext in org.springframework.batch.repeat.policy
Modifier and TypeClassDescriptionprotected class
Composite context that knows about the policies and contexts is was created with.protected class
protected class
protected class
Modifier and TypeMethodDescriptionCompletionPolicySupport.start
(RepeatContext context) Build a newRepeatContextSupport
and return it.CompositeCompletionPolicy.start
(RepeatContext context) Create a new composite context from all the available policies.CountingCompletionPolicy.start
(RepeatContext parent) SimpleCompletionPolicy.start
(RepeatContext context) Reset the counter.TimeoutTerminationPolicy.start
(RepeatContext context) Start the clock on the timeout.Modifier and TypeMethodDescriptionprotected int
CountingCompletionPolicy.doUpdate
(RepeatContext context) Extension point for subclasses.protected abstract int
CountingCompletionPolicy.getCount
(RepeatContext context) Extension point for subclasses.boolean
CompletionPolicySupport.isComplete
(RepeatContext context) Always true.boolean
CompletionPolicySupport.isComplete
(RepeatContext context, RepeatStatus result) If exit status is not continuable returntrue
, otherwise delegate toCompletionPolicySupport.isComplete(RepeatContext)
.boolean
CompositeCompletionPolicy.isComplete
(RepeatContext context) This policy is complete if any of the composed policies is complete.boolean
CompositeCompletionPolicy.isComplete
(RepeatContext context, RepeatStatus result) This policy is complete if any of the composed policies is complete.final boolean
CountingCompletionPolicy.isComplete
(RepeatContext context) boolean
DefaultResultCompletionPolicy.isComplete
(RepeatContext context) Always false.boolean
DefaultResultCompletionPolicy.isComplete
(RepeatContext context, RepeatStatus result) True if the result is null, or aRepeatStatus
indicating completion.boolean
SimpleCompletionPolicy.isComplete
(RepeatContext context) Terminate if the chunk size has been reached.boolean
SimpleCompletionPolicy.isComplete
(RepeatContext context, RepeatStatus result) Terminate if the chunk size has been reached, or the result is null.boolean
TimeoutTerminationPolicy.isComplete
(RepeatContext context) Check the timeout and complete gracefully if it has expires.CompletionPolicySupport.start
(RepeatContext context) Build a newRepeatContextSupport
and return it.CompositeCompletionPolicy.start
(RepeatContext context) Create a new composite context from all the available policies.CountingCompletionPolicy.start
(RepeatContext parent) SimpleCompletionPolicy.start
(RepeatContext context) Reset the counter.TimeoutTerminationPolicy.start
(RepeatContext context) Start the clock on the timeout.void
CompletionPolicySupport.update
(RepeatContext context) Increment the context so the counter is up to date.void
CompositeCompletionPolicy.update
(RepeatContext context) Update all the composed contexts, and also increment the parent context.final void
CountingCompletionPolicy.update
(RepeatContext context) void
SimpleCompletionPolicy.update
(RepeatContext context) Increment the counter in the context.ModifierConstructorDescriptionCompositeBatchContext
(RepeatContext context, List<RepeatContext> contexts) CountingBatchContext
(RepeatContext parent) SimpleTerminationContext
(RepeatContext context) TimeoutBatchContext
(RepeatContext context) ModifierConstructorDescriptionCompositeBatchContext
(RepeatContext context, List<RepeatContext> contexts) -
Uses of RepeatContext in org.springframework.batch.repeat.support
Modifier and TypeMethodDescriptionstatic RepeatContext
RepeatSynchronizationManager.clear()
Clear the current context at the end of a batch - should only be used byRepeatOperations
implementations.static RepeatContext
RepeatSynchronizationManager.getContext()
Getter for the current context.static RepeatContext
RepeatSynchronizationManager.register
(RepeatContext context) Method for registering a context - should only be used byRepeatOperations
implementations to ensure thatRepeatSynchronizationManager.getContext()
always returns the correct value.protected RepeatContext
RepeatTemplate.start()
Delegate to theCompletionPolicy
.Modifier and TypeMethodDescriptionprotected RepeatInternalState
RepeatTemplate.createInternalState
(RepeatContext context) Create an internal state object that is used to store data needed internally in the scope of an iteration.protected RepeatInternalState
TaskExecutorRepeatTemplate.createInternalState
(RepeatContext context) protected void
RepeatTemplate.executeAfterInterceptors
(RepeatContext context, RepeatStatus value) Convenience method to execute after interceptors on a callback result.protected RepeatStatus
RepeatTemplate.getNextResult
(RepeatContext context, RepeatCallback callback, RepeatInternalState state) Get the next completed result, possibly executing several callbacks until one finally finishes.protected RepeatStatus
TaskExecutorRepeatTemplate.getNextResult
(RepeatContext context, RepeatCallback callback, RepeatInternalState state) Use theTaskExecutorRepeatTemplate.setTaskExecutor(TaskExecutor)
to generate a result.protected boolean
RepeatTemplate.isComplete
(RepeatContext context) Delegate toCompletionPolicy
.protected boolean
RepeatTemplate.isComplete
(RepeatContext context, RepeatStatus result) Delegate to theCompletionPolicy
.static RepeatContext
RepeatSynchronizationManager.register
(RepeatContext context) Method for registering a context - should only be used byRepeatOperations
implementations to ensure thatRepeatSynchronizationManager.getContext()
always returns the correct value.protected void
RepeatTemplate.update
(RepeatContext context) Delegate to theCompletionPolicy
.