Class ComponentRegistry<V>

  • Type Parameters:
    V - the type of the registered value.

    public final class ComponentRegistry<V>
    extends Object
    Base class for all the provider classes (TracerProvider, MeterProvider, etc.).
    • Method Detail

      • get

        public final V get​(String instrumentationName)
        Returns the registered value associated with this name and null version if any, otherwise creates a new instance and associates it with the given name and null version.
        Parameters:
        instrumentationName - the name of the instrumentation library.
        Returns:
        the registered value associated with this name and null version.
      • get

        public final V get​(String instrumentationName,
                           @Nullable
                           String instrumentationVersion)
        Returns the registered value associated with this name and version if any, otherwise creates a new instance and associates it with the given name and version.
        Parameters:
        instrumentationName - the name of the instrumentation library.
        instrumentationVersion - the version of the instrumentation library.
        Returns:
        the registered value associated with this name and version.
      • getComponents

        public final Collection<V> getComponents()
        Returns a Collection view of the registered components.
        Returns:
        a Collection view of the registered components.