Top Description Methods
org.eclipse.microprofile.metrics.annotation

public @Interface RegistryScope

extends Annotation
Annotations
@Documented
@Qualifier
@Retention:RUNTIME
@Target:METHOD, FIELD, PARAMETER, ANNOTATION_TYPE
Imports
java.lang.annotation.Documented, .ElementType, .Retention, .RetentionPolicy, .Target, org.eclipse.microprofile.metrics.MetricRegistry, jakarta.enterprise.util.Nonbinding, jakarta.inject.Qualifier

Specifies the scope of Metric Registry to inject.

This can be used to obtain the respective scoped MetricRegistry:


     @Inject
     @RegistryScope(scope=MetricRegistry.APPLICATION_SCOPE)
     MetricRegistry appRegistry;

     @Inject
     @RegistryScope(scope="customScope")
     MetricRegistry customRegistry;


see MetricRegistry#APPLICATION_SCOPE, MetricRegistry#BASE_SCOPE and MetricRegistry#VENDOR_SCOPE
Author
Raymond Lam

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

Indicates the scope of the MetricRegistry to be injected. The MicroProfile runtimes provides application, base and vendor scopes automatically and creates user-defined scopes as needed. see MetricRegistry#APPLICATION_SCOPE, MetricRegistry#BASE_SCOPE and MetricRegistry#VENDOR_SCOPE
scope
()

The scope of the MetricRegistry.

Inherited from java.lang.annotation.Annotation:
annotationTypeequalshashCodetoString

Method Detail

scopeback to summary
public String scope()

The scope of the MetricRegistry.

Returns:String

Indicates the scope of the MetricRegistry to be injected. The MicroProfile runtimes provides application, base and vendor scopes automatically and creates user-defined scopes as needed. see MetricRegistry#APPLICATION_SCOPE, MetricRegistry#BASE_SCOPE and MetricRegistry#VENDOR_SCOPE

Annotations
@Nonbinding