Class FirstOnStackRetryPolicy
java.lang.Object
org.springframework.retry.policy.NeverRetryPolicy
com.atlassian.confluence.impl.spring.FirstOnStackRetryPolicy
- All Implemented Interfaces:
Serializable,org.springframework.retry.RetryPolicy
public class FirstOnStackRetryPolicy
extends org.springframework.retry.policy.NeverRetryPolicy
Retry policy that only retries if it is the first encounter of this retry policy instance on the call stack. In
effect, it ensures retries are only attempted at the top-level in situations where a service intercepted by this
policy instance calls another service that is also intercepted by this same policy instance.
This policy should be used in conjunction with 1 or more other policies (using
CompositeRetryPolicy) which will determine when to retry at the top-level.
- Since:
- 9.1
- See Also:
-
Field Summary
Fields inherited from interface org.springframework.retry.RetryPolicy
NO_MAXIMUM_ATTEMPTS_SET -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.springframework.retry.policy.NeverRetryPolicy
registerThrowableMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.retry.RetryPolicy
getMaxAttempts
-
Constructor Details
-
FirstOnStackRetryPolicy
public FirstOnStackRetryPolicy()
-
-
Method Details
-
canRetry
public boolean canRetry(org.springframework.retry.RetryContext context) - Specified by:
canRetryin interfaceorg.springframework.retry.RetryPolicy- Overrides:
canRetryin classorg.springframework.retry.policy.NeverRetryPolicy
-
open
public org.springframework.retry.RetryContext open(org.springframework.retry.RetryContext parent) - Specified by:
openin interfaceorg.springframework.retry.RetryPolicy- Overrides:
openin classorg.springframework.retry.policy.NeverRetryPolicy
-
close
public void close(org.springframework.retry.RetryContext context) - Specified by:
closein interfaceorg.springframework.retry.RetryPolicy- Overrides:
closein classorg.springframework.retry.policy.NeverRetryPolicy
-