Class InternalOMRSEventProcessingContext

java.lang.Object
org.odpi.openmetadata.repositoryservices.connectors.omrstopic.InternalOMRSEventProcessingContext

public class InternalOMRSEventProcessingContext extends Object
Internal Asynchronous message processing context. This class allows egeria to be notified when a message is being processed asynchronously so that the consumer can correctly record when the message has been completely processed. This class is not considered part of the Egeria public API and may change without notice.
  • Constructor Details

    • InternalOMRSEventProcessingContext

      public InternalOMRSEventProcessingContext()
  • Method Details

    • addAsyncProcessingResult

      public void addAsyncProcessingResult(Future<?> future)
      Registers a Future associated with asynchronous message processing.
      Parameters:
      future - registered object
    • addAsyncProcessingResult

      public void addAsyncProcessingResult(OMRSFuture future)
      Registers an OMRSFuture associated with asynchronous message processing.
      Parameters:
      future - registered object
    • getOverallAsyncProcessingResult

      public OMRSFuture getOverallAsyncProcessingResult()
      Gets the overall asynchronous processing result from all consumers. This method is guaranteed to return a non-null result. If there is no asynchronous processing happening, an instance of CompletedFuture will be returned, indicating that asynchronous processing has finished
      Returns:
      the overall processing result
    • getInstance

      public static InternalOMRSEventProcessingContext getInstance()
      Gets the thread-local InternalOMRSEventProcessingContext instance for the current thread.
      Returns:
      the instance of InternalOMRSEventProcessingContext for the current thread
    • clear

      public static void clear()
      Clears the InternalOMRSEventProcessingContext for the current thread.
    • getCurrentMessageId

      public String getCurrentMessageId()
      Gets the unique identifier for the current message that is being processed.
      Returns:
      the current message id
    • setCurrentMessageId

      public void setCurrentMessageId(String messageId)
      Sets the unique identifier for the current message that is being processed.
      Parameters:
      messageId - The messageId to set