Class Tracestate

  • Direct Known Subclasses:
    AutoValue_Tracestate

    @Immutable
    @ExperimentalApi
    public abstract class Tracestate
    extends java.lang.Object
    Carries tracing-system specific context in a list of key-value pairs. TraceState allows different vendors propagate additional information and inter-operate with their legacy Id formats.

    Implementation is optimized for a small list of key-value pairs.

    Key is opaque string up to 256 characters printable. It MUST begin with a lowercase letter, and can only contain lowercase letters a-z, digits 0-9, underscores _, dashes -, asterisks *, and forward slashes /.

    Value is opaque string up to 256 characters printable ASCII RFC0020 characters (i.e., the range 0x20 to 0x7E) except comma , and =.

    Since:
    0.16
    • Constructor Detail

      • Tracestate

        Tracestate()
    • Method Detail

      • get

        @Nullable
        public java.lang.String get​(java.lang.String key)
        Returns the value to which the specified key is mapped, or null if this map contains no mapping for the key.
        Parameters:
        key - with which the specified value is to be associated
        Returns:
        the value to which the specified key is mapped, or null if this map contains no mapping for the key.
        Since:
        0.16
      • getEntries

        public abstract java.util.List<Tracestate.Entry> getEntries()
        Returns a List view of the mappings contained in this TraceState.
        Returns:
        a List view of the mappings contained in this TraceState.
        Since:
        0.16
      • builder

        public static Tracestate.Builder builder()
        Returns a Builder based on an empty Tracestate.
        Returns:
        a Builder based on an empty Tracestate.
        Since:
        0.16
      • toBuilder

        public Tracestate.Builder toBuilder()
        Returns a Builder based on this Tracestate.
        Returns:
        a Builder based on this Tracestate.
        Since:
        0.16
      • validateKey

        private static boolean validateKey​(java.lang.String key)
      • validateValue

        private static boolean validateValue​(java.lang.String value)