Package ca.uhn.fhir.jpa.interceptor
Class UserRequestRetryVersionConflictsInterceptor
java.lang.Object
ca.uhn.fhir.jpa.interceptor.UserRequestRetryVersionConflictsInterceptor
This interceptor looks for a header on incoming requests called
X-Retry-On-Version-Conflict and
if present, it will instruct the server to automatically retry JPA server operations that would have
otherwise failed with a ResourceVersionConflictException (HTTP 409).
The format of the header is:
X-Retry-On-Version-Conflict: retry; max-retries=100
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddRetryHeader(SystemRequestDetails theRequestDetails, int theMaxRetries)Convenience method to add a retry header to a system requestcheck(ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails)
-
Field Details
-
HEADER_NAME
- See Also:
- Constant Field Values
-
MAX_RETRIES
- See Also:
- Constant Field Values
-
RETRY
- See Also:
- Constant Field Values
-
-
Constructor Details
-
UserRequestRetryVersionConflictsInterceptor
-
-
Method Details
-
check
public ResourceVersionConflictResolutionStrategy check(ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails) -
addRetryHeader
Convenience method to add a retry header to a system request
-