Interface ContextStorage

  • All Known Implementing Classes:
    ThreadLocalContextStorage

    public interface ContextStorage
    Context storage used for simulation and parameterization of context management to simulate context propagation in OpenTelemetry integration without directly requiring that library.
    • Method Detail

      • getRequestId

        @Nullable
        java.lang.String getRequestId()
        Get request identifier for the current request from the context.
        Returns:
        request id for the current request.
      • getVectorClock

        @Nullable
        VectorClock getVectorClock()
        Get vector clock for the current request from the context.
        Returns:
        vector clock for the current request.
      • getOriginVectorClock

        @Nullable
        VectorClock getOriginVectorClock()
        Get incoming vector clock for the current request.
        Returns:
        vector clock for the incoming request that triggered this request.
      • getDistributedExecutionIndex

        @Nullable
        java.lang.String getDistributedExecutionIndex()
        Get the execution index for the current request.
        Returns:
        execution index for the current request.
      • setRequestId

        void setRequestId​(java.lang.String requestId)
        Set the current request id in the context.
        Parameters:
        requestId - the identifier for the request.
      • setVectorClock

        void setVectorClock​(VectorClock vectorClock)
        Set the vector clock in the context.
        Parameters:
        vectorClock - vector clock for the current request.
      • setOriginVectorClock

        void setOriginVectorClock​(VectorClock originVectorClock)
        Set the incoming vector clock in the context.
        Parameters:
        originVectorClock - vector clock for the incoming request that triggered this request.
      • setDistributedExecutionIndex

        void setDistributedExecutionIndex​(java.lang.String distributedExecutionIndex)
        Set the execution index in the context.
        Parameters:
        distributedExecutionIndex - execution index for the current request.