Top Description Methods
io.opentelemetry.api.internal

public @Interface GuardedBy

extends Annotation
Annotations
@Target:FIELD, METHOD
@Retention:SOURCE
Imports
java.lang.annotation.ElementType, .Retention, .RetentionPolicy, .Target

The field or method to which this annotation is applied can only be accessed when holding a particular lock, which may be a built-in (synchronization) lock, or may be an explicit java.util.concurrent.locks.Lock.

The argument determines which lock guards the annotated field or method:

This annotation is similar to javax.annotation.concurrent.GuardedBy but has RetentionPolicy#SOURCE so it is not in published artifacts. We only apply this to private members, so there is no reason to publish them and we avoid requiring end users to have to depend on the annotations in their own build. See the original issue for more info.

This class is internal and is hence not for public use. Its APIs are unstable and can change at any time.

Method Summary

Modifier and TypeMethod and Description
public String
value()

The name of the object guarding the target.

Inherited from java.lang.annotation.Annotation:
annotationTypeequalshashCodetoString

Method Detail

valueback to summary
public String value()

The name of the object guarding the target.