# Uses of Interface
org.springframework.batch.repeat.RepeatContext

Packages that use RepeatContext
Package
Description
org.springframework.batch.core.resource
org.springframework.batch.core.scope.context
Implementation of the contexts for each of the custom bean scopes in Spring Batch (Job and Step).
org.springframework.batch.core.step.item
Specific implementations of step concerns for item-oriented approach.
org.springframework.batch.repeat
Infrastructure implementations of repeat concerns.
org.springframework.batch.repeat.callback
Infrastructure implementations of repeat callback concerns.
org.springframework.batch.repeat.context
Infrastructure implementations of repeat context concerns.
org.springframework.batch.repeat.exception
Infrastructure implementations of repeat exception handler concerns.
org.springframework.batch.repeat.listener
Infrastructure implementations of repeat interceptor concerns.
org.springframework.batch.repeat.policy
Infrastructure implementations of repeat policy concerns.
org.springframework.batch.repeat.support
Infrastructure implementations of repeat support concerns.

- ## Uses of RepeatContext in org.springframework.batch.core.resource

  Methods in org.springframework.batch.core.resource that return RepeatContext
  Modifier and Type
  Method
  Description
  `RepeatContext`
  StepExecutionSimpleCompletionPolicy.`start(RepeatContext parent)`
  Methods in org.springframework.batch.core.resource with parameters of type RepeatContext
  Modifier and Type
  Method
  Description
  `boolean`
  StepExecutionSimpleCompletionPolicy.`isComplete(RepeatContext context)`
  `boolean`
  StepExecutionSimpleCompletionPolicy.`isComplete(RepeatContext context, RepeatStatus result)`
  `RepeatContext`
  StepExecutionSimpleCompletionPolicy.`start(RepeatContext parent)`
  `void`
  StepExecutionSimpleCompletionPolicy.`update(RepeatContext context)`

- ## Uses of RepeatContext in org.springframework.batch.core.scope.context

  Methods in org.springframework.batch.core.scope.context with parameters of type RepeatContext
  Modifier and Type
  Method
  Description
  `abstract RepeatStatus`
  StepContextRepeatCallback.`doInChunkContext(RepeatContext context, ChunkContext chunkContext)`
  Do the work required for this chunk of the step.
  `RepeatStatus`
  StepContextRepeatCallback.`doInIteration(RepeatContext context)`
  Manage the `StepContext` lifecycle.

- ## Uses of RepeatContext in org.springframework.batch.core.step.item

  Methods in org.springframework.batch.core.step.item with parameters of type RepeatContext
  Modifier and Type
  Method
  Description
  `void`
  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

  Methods in org.springframework.batch.repeat that return RepeatContext
  Modifier and Type
  Method
  Description
  `RepeatContext`
  RepeatContext.`getParent()`
  If batches are nested, then the inner batch will be created with the outer one as a parent.
  `RepeatContext`
  CompletionPolicy.`start(RepeatContext parent)`
  Create a new context for the execution of a batch.
  Methods in org.springframework.batch.repeat with parameters of type RepeatContext
  Modifier and Type
  Method
  Description
  `default 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.
  `RepeatStatus`
  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.
  `RepeatContext`
  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

  Methods in org.springframework.batch.repeat.callback with parameters of type RepeatContext
  Modifier and Type
  Method
  Description
  `RepeatStatus`
  NestedRepeatCallback.`doInIteration(RepeatContext context)`
  Simply calls template.execute(callback).

- ## Uses of RepeatContext in org.springframework.batch.repeat.context

  Classes in org.springframework.batch.repeat.context that implement RepeatContext
  Modifier and Type
  Class
  Description
  `class`
  `RepeatContextSupport`
  Methods in org.springframework.batch.repeat.context that return RepeatContext
  Modifier and Type
  Method
  Description
  `RepeatContext`
  RepeatContextSupport.`getParent()`
  Constructors in org.springframework.batch.repeat.context with parameters of type RepeatContext
  Modifier
  Constructor
  Description
  ``
  `RepeatContextCounter(RepeatContext context, String countKey)`
  Convenience constructor with useParent=false.
  ``
  `RepeatContextCounter(RepeatContext context, String countKey, boolean useParent)`
  Construct a new `RepeatContextCounter`.
  ``
  `RepeatContextSupport(RepeatContext parent)`
  Constructor for `RepeatContextSupport`.

- ## Uses of RepeatContext in org.springframework.batch.repeat.exception

  Methods in org.springframework.batch.repeat.exception with parameters of type RepeatContext
  Modifier and Type
  Method
  Description
  `void`
  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

  Methods in org.springframework.batch.repeat.listener with parameters of type RepeatContext
  Modifier and Type
  Method
  Description
  `void`
  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

  Classes in org.springframework.batch.repeat.policy that implement RepeatContext
  Modifier and Type
  Class
  Description
  `protected class`
  `CompositeCompletionPolicy.CompositeBatchContext`
  Composite context that knows about the policies and contexts is was created with.
  `protected class`
  `CountingCompletionPolicy.CountingBatchContext`
  `protected class`
  `SimpleCompletionPolicy.SimpleTerminationContext`
  `protected class`
  `TimeoutTerminationPolicy.TimeoutBatchContext`
  Methods in org.springframework.batch.repeat.policy that return RepeatContext
  Modifier and Type
  Method
  Description
  `RepeatContext`
  CompletionPolicySupport.`start(RepeatContext context)`
  Build a new `RepeatContextSupport` and return it.
  `RepeatContext`
  CompositeCompletionPolicy.`start(RepeatContext context)`
  Create a new composite context from all the available policies.
  `RepeatContext`
  CountingCompletionPolicy.`start(RepeatContext parent)`
  `RepeatContext`
  SimpleCompletionPolicy.`start(RepeatContext context)`
  Reset the counter.
  `RepeatContext`
  TimeoutTerminationPolicy.`start(RepeatContext context)`
  Start the clock on the timeout.
  Methods in org.springframework.batch.repeat.policy with parameters of type RepeatContext
  Modifier and Type
  Method
  Description
  `protected 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 return `true`, otherwise delegate to `CompletionPolicySupport.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 a `RepeatStatus` 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.
  `RepeatContext`
  CompletionPolicySupport.`start(RepeatContext context)`
  Build a new `RepeatContextSupport` and return it.
  `RepeatContext`
  CompositeCompletionPolicy.`start(RepeatContext context)`
  Create a new composite context from all the available policies.
  `RepeatContext`
  CountingCompletionPolicy.`start(RepeatContext parent)`
  `RepeatContext`
  SimpleCompletionPolicy.`start(RepeatContext context)`
  Reset the counter.
  `RepeatContext`
  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.
  Constructors in org.springframework.batch.repeat.policy with parameters of type RepeatContext
  Modifier
  Constructor
  Description
  ``
  `CompositeBatchContext(RepeatContext context, List<RepeatContext> contexts)`
  ``
  `CountingBatchContext(RepeatContext parent)`
  ``
  `SimpleTerminationContext(RepeatContext context)`
  ``
  `TimeoutBatchContext(RepeatContext context)`
  Constructor parameters in org.springframework.batch.repeat.policy with type arguments of type RepeatContext
  Modifier
  Constructor
  Description
  ``
  `CompositeBatchContext(RepeatContext context, List<RepeatContext> contexts)`

- ## Uses of RepeatContext in org.springframework.batch.repeat.support

  Methods in org.springframework.batch.repeat.support that return RepeatContext
  Modifier and Type
  Method
  Description
  `static RepeatContext`
  RepeatSynchronizationManager.`clear()`
  Clear the current context at the end of a batch - should only be used by `RepeatOperations` 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 by `RepeatOperations` implementations to ensure that `RepeatSynchronizationManager.getContext()` always returns the correct value.
  `protected RepeatContext`
  RepeatTemplate.`start()`
  Delegate to the `CompletionPolicy`.
  Methods in org.springframework.batch.repeat.support with parameters of type RepeatContext
  Modifier and Type
  Method
  Description
  `protected 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 the `TaskExecutorRepeatTemplate.setTaskExecutor(TaskExecutor)` to generate a result.
  `protected boolean`
  RepeatTemplate.`isComplete(RepeatContext context)`
  Delegate to `CompletionPolicy`.
  `protected boolean`
  RepeatTemplate.`isComplete(RepeatContext context, RepeatStatus result)`
  Delegate to the `CompletionPolicy`.
  `static RepeatContext`
  RepeatSynchronizationManager.`register(RepeatContext context)`
  Method for registering a context - should only be used by `RepeatOperations` implementations to ensure that `RepeatSynchronizationManager.getContext()` always returns the correct value.
  `protected void`
  RepeatTemplate.`update(RepeatContext context)`
  Delegate to the `CompletionPolicy`.