Class ErrorMessageCache
java.lang.Object
org.odpi.openmetadata.adapters.repositoryservices.xtdb.repositoryconnector.cache.ErrorMessageCache
A thread-safe way of capturing errors for a given transaction for error-handling purposes across threads.
(Basically so we can still throw meaningful errors back to API calls even though the back-end processing
happens in a different thread, asynchronously, from the API call itself.)
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
ErrorMessageCache
public ErrorMessageCache()
-
-
Method Details
-
add
Add an error for a given transaction.- Parameters:
txId
- transaction for which to add the errorerror
- error to record- Returns:
- Exception error that was added
-
get
Retrieve any error for the given transaction.- Parameters:
txId
- transaction for which to retrieve error- Returns:
- Exception if there was any error, or null if there was no error
-