Package nl.vpro.domain.media
Annotation Type MediaObjectLocker.Mid
-
@Retention(RUNTIME) public static @interface MediaObjectLocker.Mid
Adding this annotation of a method with aString
orMediaIdentifiable
argument will 'lock' the identifier, and will make sure that no other code doing the same will run simultaneously.Much code like this will be getting a mediaobject using this mid, change it and then commit the mediaobject.
If another thread is changing the mediaobject in between those events, those changes will be lost.
This can therefore be avoided using these annotations (or equivalently by using
MediaObjectLocker.withMidLock(String, String, Callable)