Class ThreadLocalContextStorage

    • Field Detail

      • useGlobalContext

        public static boolean useGlobalContext
    • Constructor Detail

      • ThreadLocalContextStorage

        public ThreadLocalContextStorage()
    • Method Detail

      • clear

        public static void clear()
      • set

        public static <T> void set​(java.lang.String key,
                                   T value)
      • get

        public static <T> T get​(java.lang.String key)
      • getRequestId

        public java.lang.String getRequestId()
        Description copied from interface: ContextStorage
        Get request identifier for the current request from the context.
        Specified by:
        getRequestId in interface ContextStorage
        Returns:
        request id for the current request.
      • getVectorClock

        public VectorClock getVectorClock()
        Description copied from interface: ContextStorage
        Get vector clock for the current request from the context.
        Specified by:
        getVectorClock in interface ContextStorage
        Returns:
        vector clock for the current request.
      • getOriginVectorClock

        public VectorClock getOriginVectorClock()
        Description copied from interface: ContextStorage
        Get incoming vector clock for the current request.
        Specified by:
        getOriginVectorClock in interface ContextStorage
        Returns:
        vector clock for the incoming request that triggered this request.
      • getDistributedExecutionIndex

        public java.lang.String getDistributedExecutionIndex()
        Description copied from interface: ContextStorage
        Get the execution index for the current request.
        Specified by:
        getDistributedExecutionIndex in interface ContextStorage
        Returns:
        execution index for the current request.
      • setRequestId

        public void setRequestId​(java.lang.String requestId)
        Description copied from interface: ContextStorage
        Set the current request id in the context.
        Specified by:
        setRequestId in interface ContextStorage
        Parameters:
        requestId - the identifier for the request.
      • setVectorClock

        public void setVectorClock​(VectorClock vectorClock)
        Description copied from interface: ContextStorage
        Set the vector clock in the context.
        Specified by:
        setVectorClock in interface ContextStorage
        Parameters:
        vectorClock - vector clock for the current request.
      • setOriginVectorClock

        public void setOriginVectorClock​(VectorClock originVectorClock)
        Description copied from interface: ContextStorage
        Set the incoming vector clock in the context.
        Specified by:
        setOriginVectorClock in interface ContextStorage
        Parameters:
        originVectorClock - vector clock for the incoming request that triggered this request.
      • setDistributedExecutionIndex

        public void setDistributedExecutionIndex​(java.lang.String distributedExecutionIndex)
        Description copied from interface: ContextStorage
        Set the execution index in the context.
        Specified by:
        setDistributedExecutionIndex in interface ContextStorage
        Parameters:
        distributedExecutionIndex - execution index for the current request.