Class SimpleBaggageInScope

java.lang.Object
io.micrometer.tracing.test.simple.SimpleBaggageInScope
All Implemented Interfaces:
io.micrometer.tracing.Baggage, io.micrometer.tracing.BaggageInScope, io.micrometer.tracing.BaggageView, Closeable, AutoCloseable

public class SimpleBaggageInScope extends Object implements io.micrometer.tracing.Baggage, io.micrometer.tracing.BaggageInScope
A test implementation of a baggage/baggage in scope.
Since:
1.0.0
  • Constructor Details

    • SimpleBaggageInScope

      public SimpleBaggageInScope(String name)
      Creates a new instance of SimpleBaggageInScope.
      Parameters:
      name - name
  • Method Details

    • name

      public String name()
      Specified by:
      name in interface io.micrometer.tracing.BaggageView
    • get

      public String get()
      Specified by:
      get in interface io.micrometer.tracing.BaggageView
    • get

      public String get(io.micrometer.tracing.TraceContext traceContext)
      Specified by:
      get in interface io.micrometer.tracing.BaggageView
    • set

      public io.micrometer.tracing.Baggage set(String value)
      Specified by:
      set in interface io.micrometer.tracing.Baggage
    • set

      public io.micrometer.tracing.Baggage set(io.micrometer.tracing.TraceContext traceContext, String value)
      Specified by:
      set in interface io.micrometer.tracing.Baggage
    • makeCurrent

      public io.micrometer.tracing.BaggageInScope makeCurrent()
      Specified by:
      makeCurrent in interface io.micrometer.tracing.Baggage
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface io.micrometer.tracing.BaggageInScope
      Specified by:
      close in interface Closeable
    • isInScope

      public boolean isInScope()
      Checks if baggage is in scope.
      Returns:
      true when baggage in scope
    • isClosed

      public boolean isClosed()
      Checks if baggage scope was closed.
      Returns:
      true when baggage was closed
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object