Interface ThreadContextStatePropagator

All Known Implementing Classes:
TaskThreadContextStatePropagator, ThreadContextBasedTracerContextStorage

@PublicApi(since="2.8.0") public interface ThreadContextStatePropagator
The propagator for ThreadContext that helps to carry-over the state from one thread to another (tasks, tracing context, etc).
Opensearch.api:
  • Method Summary

    Modifier and Type
    Method
    Description
    Deprecated, for removal: This API element is subject to removal in a future version.
    default Map<String,String>
    headers(Map<String,Object> source, boolean isSystemContext)
    Returns the list of request headers that needs to be propagated from current context to request.
    Deprecated, for removal: This API element is subject to removal in a future version.
    default Map<String,Object>
    transients(Map<String,Object> source, boolean isSystemContext)
    Returns the list of transient headers that needs to be propagated from current context to new thread context.
  • Method Details

    • transients

      @Deprecated(since="2.12.0", forRemoval=true) Map<String,Object> transients(Map<String,Object> source)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns the list of transient headers that needs to be propagated from current context to new thread context.
      Parameters:
      source - current context transient headers
      Returns:
      the list of transient headers that needs to be propagated from current context to new thread context
    • transients

      default Map<String,Object> transients(Map<String,Object> source, boolean isSystemContext)
      Returns the list of transient headers that needs to be propagated from current context to new thread context.
      Parameters:
      source - current context transient headers
      isSystemContext - if the propagation is for system context.
      Returns:
      the list of transient headers that needs to be propagated from current context to new thread context
    • headers

      @Deprecated(since="2.12.0", forRemoval=true) Map<String,String> headers(Map<String,Object> source)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns the list of request headers that needs to be propagated from current context to request.
      Parameters:
      source - current context headers
      Returns:
      the list of request headers that needs to be propagated from current context to request
    • headers

      default Map<String,String> headers(Map<String,Object> source, boolean isSystemContext)
      Returns the list of request headers that needs to be propagated from current context to request.
      Parameters:
      source - current context headers
      isSystemContext - if the propagation is for system context.
      Returns:
      the list of request headers that needs to be propagated from current context to request