java.lang.Object
jakarta.enterprise.util.AnnotationLiteral<Lock>
jakarta.enterprise.concurrent.Lock.Literal
- All Implemented Interfaces:
Annotation
- Enclosing class:
Lock
public static final class Lock.Literal
extends jakarta.enterprise.util.AnnotationLiteral<Lock>
implements Lock
Supports inline instantiation of the
Lock annotation.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class jakarta.enterprise.concurrent.Lock
Lock.Literal, Lock.Type -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionlongReturns the time to wait to obtain a lock.static Lock.LiteralCreate aLockannotation instance.type()Returns the Lock.Type to use.unit()Returns units used for the specified accessTimeout value.Methods inherited from class jakarta.enterprise.util.AnnotationLiteral
annotationType, equals, hashCode, toString
-
Field Details
-
INSTANCE
Instance of the Literal annotation.
-
-
Method Details
-
of
Create aLockannotation instance. -
type
Returns the Lock.Type to use.- Returns:
- the Lock.Type to use
-
accessTimeout
public long accessTimeout()Returns the time to wait to obtain a lock.- Returns:
- the time to wait to obtain a lock
-
unit
Returns units used for the specified accessTimeout value.- Returns:
- units used for the specified accessTimeout value
-