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
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
addRetryHeader
(ca.uhn.fhir.rest.api.server.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
Deprecated.Deprecated and moved toConstants.HEADER_RETRY_ON_VERSION_CONFLICT
- See Also:
-
MAX_RETRIES
Deprecated.Deprecated and moved toConstants.HEADER_MAX_RETRIES
- See Also:
-
RETRY
Deprecated.Deprecated and moved toConstants.HEADER_RETRY
- See Also:
-
-
Constructor Details
-
UserRequestRetryVersionConflictsInterceptor
-
-
Method Details
-
check
public ResourceVersionConflictResolutionStrategy check(ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails) -
addRetryHeader
public static void addRetryHeader(ca.uhn.fhir.rest.api.server.SystemRequestDetails theRequestDetails, int theMaxRetries) Convenience method to add a retry header to a system request
-