Package io.quarkus.arc
Annotation Type Lock
-
@InterceptorBinding @Inherited @Target({TYPE,METHOD}) @Retention(RUNTIME) public @interface Lock
Defines a concurrency lock for a bean.The container provides a built-in interceptor for this interceptor binding. Each interceptor instance associated with a contextual instance of an intercepted bean holds a
ReadWriteLock
instance with non-fair ordering policy.
-
-
Element Detail
-
value
Lock.Type value
- Returns:
- the type of the lock
- Default:
- io.quarkus.arc.Lock.Type.WRITE
-
-
-
time
long time
If it's not possible to acquire the lock in the given time aLockException
is thrown.- Returns:
- the wait time
- See Also:
Lock.tryLock(long, TimeUnit)
- Default:
- -1L
-
-
-
unit
TimeUnit unit
- Returns:
- the wait time unit
- Default:
- java.util.concurrent.TimeUnit.MILLISECONDS
-
-