Class ThreadNameProcessingIdProvider

java.lang.Object
church.i18n.processing.storage.ThreadNameProcessingIdProvider
All Implemented Interfaces:
ProcessingIdProvider

public class ThreadNameProcessingIdProvider extends Object implements ProcessingIdProvider
An implementation of the ProcessingIdProvider that returns thread name. The thread name should be unique for each operation it is processing. This implementation expects processing of an operation only by a single thread, and it is not processed by multiple threads.
  • Constructor Details

    • ThreadNameProcessingIdProvider

      public ThreadNameProcessingIdProvider()
  • Method Details

    • getProcessingId

      @NotNull public @NotNull String getProcessingId()
      Description copied from interface: ProcessingIdProvider
      Unique identification of a processing request.
      Specified by:
      getProcessingId in interface ProcessingIdProvider
      Returns:
      The method should return the same value for a single processing request across the whole system. However, it should return unique value for all different operations. One of possible implementations could that it returns UUID per each user request. Typical example could be a request ID or a correlation ID of a request.
    • toString

      @NotNull public @NotNull String toString()
      Overrides:
      toString in class Object