org.springframework.batch.retry.policy
Class AlwaysRetryPolicy

java.lang.Object
  extended by org.springframework.batch.retry.policy.AbstractStatelessRetryPolicy
      extended by org.springframework.batch.retry.policy.NeverRetryPolicy
          extended by org.springframework.batch.retry.policy.AlwaysRetryPolicy
All Implemented Interfaces:
RetryPolicy

public class AlwaysRetryPolicy
extends NeverRetryPolicy

A RetryPolicy that always permits a retry. Can also be used as a base class for other policies, e.g. for test purposes as a stub.

Author:
Dave Syer

Constructor Summary
AlwaysRetryPolicy()
           
 
Method Summary
 boolean canRetry(RetryContext context)
          Always returns true.
 
Methods inherited from class org.springframework.batch.retry.policy.NeverRetryPolicy
close, open, registerThrowable
 
Methods inherited from class org.springframework.batch.retry.policy.AbstractStatelessRetryPolicy
handleRetryExhausted, shouldRethrow
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AlwaysRetryPolicy

public AlwaysRetryPolicy()
Method Detail

canRetry

public boolean canRetry(RetryContext context)
Always returns true.

Specified by:
canRetry in interface RetryPolicy
Overrides:
canRetry in class NeverRetryPolicy
Parameters:
context - the current retry status
Returns:
true if the operation can proceed
See Also:
RetryPolicy.canRetry(org.springframework.batch.retry.RetryContext)


Copyright © 2009 SpringSource. All Rights Reserved.